eolymp
bolt
Try our new interface for solving problems
Problems

Сonstruct a triangle with two sides and the included angle

Сonstruct a triangle with two sides and the included angle

Construct a triangle given two sides and included angle.

Input

Contains three real numbers - the lengths of two sides of triangle and the angle between them in degrees. The lengths of the sides are positive numbers not exceeding 104, the angle is a positive number less than 180.

Output

Print 6 real numbers - the coordinates of the vertices of any triangle corresponding to the given input data with an accuracy at least 6 decimal digits.

Time limit 1 second
Memory limit 128 MiB
Input example #1
10 5 60
Output example #1
0 0
10.0 0
2.5000000000 4.3301270189