DWITE Contest

Test Case for Question #1 in DWITE 2011-2012 High School Round 2

Contest: DWITE 2011-2012 High School Round 2
Question: #1
Input File: DATA1.txt
Output File: OUT1.txt


Input

5
163
1729
90909
100000




Output

3 -2
81 -82
859 -870
45369 -45540
50048 -49952