{"raw_statement":[{"iden":"problem statement","content":"A shop sells $N$ kinds of lunchboxes, one for each kind.  \nFor each $i = 1, 2, \\ldots, N$, the $i$\\-th kind of lunchbox contains $A_i$ takoyaki (octopus balls) and $B_i$ taiyaki (fish-shaped cakes).\nTakahashi wants to eat $X$ or more takoyaki and $Y$ or more taiyaki.  \nDetermine whether it is possible to buy some number of lunchboxes to get at least $X$ takoyaki and at least $Y$ taiyaki. If it is possible, find the minimum number of lunchboxes that Takahashi must buy to get them.\nNote that just one lunchbox is in stock for each kind; you cannot buy two or more lunchboxes of the same kind."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 300$\n*   $1 \\leq X, Y \\leq 300$\n*   $1 \\leq A_i, B_i \\leq 300$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$X$ $Y$\n$A_1$ $B_1$\n$A_2$ $B_2$\n$\\vdots$\n$A_N$ $B_N$"},{"iden":"sample input 1","content":"3\n5 6\n2 1\n3 4\n2 3"},{"iden":"sample output 1","content":"2\n\nHe wants to eat $5$ or more takoyaki and $6$ or more taiyaki.  \nBuying the second and third lunchboxes will get him $3 + 2 = 5$ taiyaki and $4 + 3 = 7$ taiyaki."},{"iden":"sample input 2","content":"3\n8 8\n3 4\n2 3\n2 1"},{"iden":"sample output 2","content":"\\-1\n\nEven if he is to buy every lunchbox, it is impossible to get at least $8$ takoyaki and at least $8$ taiyaki.  \nThus, print $-1$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}