Bessie went down to town to see her former teacher, Professor Snarf.
Snarf was a clever math professor who often answered questions in "Where do you live?" asked Bessie.
"I live on University Drive, of course," said Snarf. "University Drive is an interesting street since all the houses are on the same side of the road looking at the beautiful University Park. The houses start at number 1 and are numbered sequentially through N. If I stick my head out the door and calculate the sum of all the house numbers to my right, I note that it is the same sum as the sum of the house numbers to my left. Isn't that interesting?"
Bessie knows that Snarf's address is larger than some integer A (3 <= A <= 1,940,500). Given A, calculate Snarf's smallest possible address and N, the number of houses on his street.
Bessie wants to test your program and will tell you that A is 3. Your program should figure out that Snarf lives at house 6 of 8 houses on the street (since 1+2+3+4+5 = 15 = 7+8).
输入描述:
Line 1: A single integer: A
输出描述:
Line 1: A single line with two space-separated integers: Snarf's address and N