Amy is a big fan of jelly, and wishes to buy some for dessert. There are a total of n flavours of jelly, numbered 0 to n−1. Store A sells jelly of flavour i for a\[i] dollars a piece, whereas Store B sells it for b\[i] dollars a piece. Amy can spend up to x dollars in Store A and up to y dollars in Store B.
Help Amy find the maximum number of unique flavours of jelly she can purchase.