Test Case for Question #2 in DWITE 2010-2011 High School Round 2
Contest: DWITE 2010-2011 High School Round 2
Question: #2
Input File: DATA2.txt
Output File: OUT2.txt
Input
134 54
1000 1
1000 666
645 32
68 2
Output
85
1
346
584
68