# Julia, 29 bytes

    x->y->prod(x)÷cumprod(x)⋅y

[Try it online!]

[Try it online!]: http://julia.tryitonline.net/#code=ZiA9IHgtPnktPnByb2QoeCnDt2N1bXByb2QoeCnii4V5CgpwcmludGxuKGYoWzUsIDEwXSkoWzQsIDJdKSkKcHJpbnRsbihmKFsxMCwgMTAsIDQsIDYyLCA3XSkoWzEsIDIsIDMsIDQsIDVdKSkKcHJpbnRsbihmKFs1LCAxLCAxMF0pKFszLCAwLCA3XSkpCnByaW50bG4oZihbNiwgNiwgNiwgNiwgNiwgNiwgNiwgNiwgNiwgNl0pKFszLCAxLCA1LCA1LCAzLCAwLCA1LCAyLCA1LCA0XSkp&input=