4272.Vectors

Time Limit: 1s Memory Limit: 256MB

At a geometry lesson Gerald was given a task: to get vector B out of vector A. Besides, the teacher permitted him to perform the following operations with vector A:
Turn the vector by 90 degrees clockwise. Add to the vector a certain vector C.
Operations could be performed in any order any number of times.

Can Gerald cope with the task?

Input Format(From the terminal/stdin)

The first line contains integers x1 , y1 - the coordinates of the vector A (-108 \le x1,y1 \le 108). The second and the third line contain in the similar manner vectors B and C (their coordinates are integers; their absolute value does not exceed 108).

Output Format(To the terminal/stdout)

Print "YES" (without the quotes) if it is possible to get vector B using the given operations. Otherwise print "NO" (without the quotes).

Sample Input 1

Copy
0 0
1 1
0 1
 · \n
 · \n
 · \n

Sample Output 1

Copy
YES
   \n

Sample Input 2

Copy
0 0
1 1
1 1
 · \n
 · \n
 · \n

Sample Output 2

Copy
YES
   \n

Sample Input 3

Copy
0 0
1 1
2 2
 · \n
 · \n
 · \n

Sample Output 3

Copy
NO
  \n

Submit

请先 登录

© 2025 FAQs