Inaho is taking a walk! He texts you the location he walks to from his house, which is located at the origin on a 2D plane. You know that the location has coordinates . However, Inaho can only walk in 2 directions: and .
is defined as the direction from to , and Inaho defines that distance as 1 .
is defined as the direction from to , and Inaho defines that distance as 1 .
Help Inaho determine how far in each direction he must travel in order to reach his destination.
Input Specification
The first line will contain the integers .
The next line will contain the integers .
The next line will contain the integers .
Output Specification
Output 2 space separated real numbers, the number of and Inaho must travel in direction and , respectively. It is guaranteed that there is exactly 1 distinct solution. Your output will be considered correct if it has a relative error of at most .
Subtasks
Subtask 1 [30%]
It is guaranteed that the number of and will be integers.
Subtask 2 [70%]
No further constraints.
Sample Input
9 10
1 2
3 4
Sample Output
-3 4
Explanation for Sample 1
Inaho can first travel , after which he will move units left and units down, ending up on the point . Then he can travel , after which he will move units end right and units up, ending up on the point .
Comments