Codeforces Beta Round 79 (Div. 1 Only)
C
Vectors
Codeforces
2000
原题
← BD →
翻译中…

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 $*А*$:

翻译中…
  • 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

翻译中…

The first line contains integers $*x*_{1}$ и $*y*_{1}$ — the coordinates of the vector $*A*$ ($- 10^{8} ≤ *x*_{1}, *y*_{1} ≤ 10^{8}$). 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 $10^{8}$).

翻译中…

Output

翻译中…

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

翻译中…

样例

Input #1
0 0
1 1
0 1
Output #1
YES
InputCopy OutputCopy
Input #2
0 0
1 1
1 1
Output #2
YES
InputCopy OutputCopy
Input #3
0 0
1 1
2 2
Output #3
NO
InputCopy OutputCopy
题目信息
题号
101C
时间限制
1 s
内存限制
256 MB
标签
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。