~/algor $ cat problems/case-nuqtani-burish
Rotate a point
Easy
1000 ms
64 MB
24%
A point $(x; y)$ of the coordinate plane is rotated counterclockwise around the origin by $\alpha$ degrees. Find the coordinates of the point after the rotation.
Input
One line with three integers: $x$, $y$ and $\alpha$.
Output
One line with two integers: the $x$ and $y$ coordinates of the new point.
Note
$-1000 \le x, y \le 1000$
$\alpha \in \{0, 90, 180, 270\}$
Examples
Input #1
3 1 90
Output #1
-1 3
Input #2
3 1 270
Output #2
1 -3