#codefestival2015okinawab. [code_festival_2015_okinawa_b]Beware of the Sogginess!

[code_festival_2015_okinawa_b]Beware of the Sogginess!

Problem

Hence Wolf Sothe likes eating Okinawa Soba (a kind of famous food in Okinawa, which is made of noodles and soup), he comes to an Okinawa Soba restaurant today. There are NN different kinds of Okinawa Soba. At the beginning, the ithi_{th} kind of Okinawa Soba consists of aia_i grams of noodles and bib_i grams of soup.

Noodles will absorb soup after being purchased. Specifically, for the ithi_{th} kind of Okinawa Soba, if we had waited for tt (tt is a real number such that t0t≧0) seconds after the purchase, the weight of the noodles will be min(ai+t,ai+bi)min( a_i + t , a_i + b_i ) grams, the weight of soup will be max(bit,0)max( b_i − t , 0 ) grams. The waiting time for each kind of Okinawa Soba is independent.

Wolf Sothe will choose a few kinds of Okinawa Soba among the NN kinds to buy. For each kind of Okinawa Soba, there is only 1 item available.

Wolf Sothe wants to eat XX or more than XX grams of noodles and YY or more than YY grams of soup in total. Find the best solution that only needs the minimum amount of items of Okinawa Soba.

Please note that it costs no time for Wolf Sothe for eating Okinawa Soba, thus while Wolf Sothe is eating there is no absorption. In the other words, noodles will not absorb soup while Wolf Sothe is eating.


Input

Inputs will be given by standard input in following format.

NN XX YY a1a_1 b1b_1 : aNa_N bNb_N

  • At the first line, integer N(1N50)N(1≦N≦50), X(1X10,000)X(1≦X≦10,000), Y(1Y10,000)Y(1≦Y≦10,000) will be given divided by spaces.
  • From the second line there are NN additional lines, for each line ai(1ai10,000)a_i (1≦ a_i ≦10,000), bi(1bi10,000)b_i (1≦ b_i ≦10,000) will be given divided by spaces.

Output

Please output the number of the minimum amount of items of Okinawa Soba that needs to be purchased to let Wolf Sothe to eat XX or more than XX grams of noodles and YY or more than YY grams of soup.

If there is no solution that meets Wolf Sothe’s need, output -1.

Print a newline at the end of output.


Input Example 1


3 9 7
3 4
8 1
4 5

Output Example 1


2

Purchase the 1st and the 3rd kind of Okinawa Soba. For the 1st kind of Okinawa Soba, wait 22 second before eating. For the 3rd kind of Okinawa Soba, eat it as soon as it is purchased. Thus, it is possible to eat (3+2)+(4+0)=9(3 + 2) + (4 + 0) = 9 grams of noodles and (42)+(50)=7(4 − 2) + (5 − 0) = 7 grams of soup.


Input Example 2


5 20 24
8 1
4 6
10 3
10 2
5 10

Output Example 2


-1

Because there is less than 2424 grams of soup in total, it is impossible to meet Wolf Sothe’s need even if all kinds of Okinawa Soba were purchased. Thus, output -1.


Input Example 3


5 6 8
1 3
6 2
2 3
3 5
1 4

Output Example 3


3