#Lutece1812. ryt Loves AI Robots

ryt Loves AI Robots

Migrated from Lutece 1812 ryt Loves AI Robots

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

Recently, ryt got a programmable robot named AR.He developed a program instructing AR to find a girlfriend for him. At time t=0t = 0, AR is located at (0,0)(0,0), facing toward the positive direction of the xx-axis. Every second, AR will advance aa metres toward its current facing direction. Smart ryt knows that AR cannot finish the mission if it only moves in one direction. So he lets AR to turn its direction with θ\theta degrees counter-clockwisely at every second passed, namely, at time t=1,2,3,...t = 1,2,3,... and so on. ryt armed with excellent programming skills, the turning of AR costs no time and is done exactly where it is.
Finally at time t=Tt = T, ryt receives a message from his AR that his girlfriend is found. But he forget to write the procedure of sending postion back. Now ryt is depressed. Could you tell him where his girlfriend is to cheer him up?

Input

Input contains two lines.
The first line of input contains two integers aa and θ\theta (0a1000 \leq a \leq 100, 0θ1800 \leq \theta \leq 180). The second line contains only one integer TT (0<T1070 < T \leq 10^{7}).

Output

Output two integers, indicating the xx and yy coordinates of his girlfriend, rounded to nearest integers.

Samples

1 90
3
0 1