Problem A - Ant on a Chessboard ------------------------------- One day, an ant called Alice came to an M*M chessboard. She wanted to go around all the cells. So she began to walk along the chessboard in the following way (you can assume that her speed is one cell per second): Initially, Alice was standing at (1,1). First she went up a cell, then a cell to the right, then a cell downward. After that, she went a cell to the right, then two cells upward, and then two cells to the left. In other words, her first 25 seconds went like this (the numbers in the cells stand for the time when she visited the cell): 25 24 23 22 21 10 11 12 13 20 9 8 7 14 19 2 3 6 15 18 1 4 5 16 17 At the 8th second, she was at (2,3), and at 20th second, she was at (5,4). Your task is to decide where she was at a given time (you can assume that M is large enough). Input ----- The input will contain several lines> andch line will contain a number N (1 <= N <= 2*10^9), which stands for the time. The last line of input will contain the number 0. This line should not be processed. Output ------ For each input, you should print a line with two numbers, the column and the row number separated by a single space. Sample Input ------------ 8 20 25 0 Output for Sample Input ----------------------- 2 3 5 4 1 5