Trigonometric Function

Time Limit: 1000ms
Memory Limit: 65536KB
This problem will be judged on HDU. Original ID: 3903
64-bit integer IO format: %I64d      Java class name: Main

Description

Give you a triangle ABC. Get more information in the picture below.

Now, give you 6 integers a, b, c, n, m and k. a, b and c are triangle ABC`s three edges. Can you judge whether the result of the following fraction is rational number?

Input

There are several test cases in the input data.
Each case is just one line with 6 integers -- a, b, c, n, m, k (0< a, b, c, n, m, k < 10^4) separated by spaces. The input data ensures that sin(kC) will not be equal with 0.

Output

Each case output “YES”, if the result of the fraction is rational number, otherwise “NO”.

Sample Input

2
1 1 1 1 1 1
3 4 5 6 7 7

Sample Output

NO
YES

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .