1029: Makeup Exam: Problem3

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:332 Solved:45

Description

Point (x,y) in the Cartesian coordinate rotating about the origin over t radians is calculated by the linear transformation 
x1 = cos(t) * x - sin(t) * y
y1 = sin(t) * x + cos(t) * y
Write a program in C language to restore a rotated point (x1,y1) in Cartesian plane about a pivot point (x0,y0) over a t radian. The number in the answer contains three digits in the fractional part. The input writes, 

x1 y1 x0 y0 t

and the output writes,

x,y

Notice the output has 3 digits in the fractional part.

Input

1.000 1.000 0.000 0.000 1.571

Output

1.000,-1.000

Sample Input Copy

1.000 1.000 0.500 0.500 1.600

Sample Output Copy

0.985,-0.014