Spaceship

All submissions for this problem are available.
Problem description.
Aliens have attacked the Earth! Now, the General secretary of the UN has asked you to find out the position of the main spaceship of the aliens. On the coordinate system, the spaceship starts at (0,0).Then the spaceship makes N Turns. On the first turn the spaceship goes 1 unit right On the second turn, the spaceship goes 2 units up. On the third turn, the spaceship goes 3 units to the left. On the fourth turn, the spaceship goes 4 units down. On the fifth turn, the spaceship goes 5 units to the right. And so on. The G.sec of the UN will give you the number of turns the spaceship has turned and you in turn, have to find out its position after performing the turns.
Input
Input description.
Output
Output description.
For each test case output a single line, containing two integers  the coordinates of the spaceship.
Constraints
 1 ≤ T ≤ 10000
 1 ≤ N ≤ 10^9
Example
Input: 4 1 2 3 4 Output: 1 0 1 2 2 2 2 2
Author:  akshaj 
Tags  akshaj 
Date Added:  11102015 
Time Limit:  0.09 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.5, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 