DWITE Contest

Test Case for Question #3 in DWITE 2010-2011 High School Round 1

Contest: DWITE 2010-2011 High School Round 1
Question: #3
Input File: DATA3.txt
Output File: OUT3.txt


Input

1 10
75 100
255 255
357 159
9999 9999




Output

10
183
996
894
37620