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 x1 и y1 — the coordinates of the vector A ( - 108 ≤ x1, y1 ≤ 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

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

Examples

Input

0 0
1 1
0 1


Output

YES


Input

0 0
1 1
1 1


Output

YES


Input

0 0
1 1
2 2


Output

NO
#include <bits/stdc++.h>
using namespace std;
const int maxint = -1u >> 1;
struct node {
  long long x, y;
};
node A, B, C;
int gao2(long long ax, long long ay, long long bx, long long by, long long cx,
         long long cy) {
  if (cx == 0 && cy == 0) {
    if (ax != bx || ay != by)
      return 0;
    else
      return 1;
  }
  if (cx == 0) {
    if (ax == bx && (by - ay) % cy == 0 && (by - ay) / cy >= 0) return 1;
    if ((ax + by) % cy == 0 && (ax + by) / cy >= 0 && (bx - ay) % cy == 0 &&
        (bx - ay) / cy >= 0)
      return 1;
    return 0;
  }
  if (cy == 0) {
    if (ay == by && (bx - ax) % cx == 0 && (bx - ax) / cx >= 0) return 1;
    if ((bx - ay) % cx == 0 && (bx - ay) / cx >= 0 && (-by - ax) % cx == 0 &&
        (-ax - by) / cx >= 0)
      return 1;
    return 0;
  }
  long long a = ax + by;
  long long b = bx - ay;
  if ((bx - ax) % cx == 0 && (by - ay) % cy == 0 && (bx - ax) * cx >= 0 &&
      (by - ay) * cy >= 0 && (bx - ax) / cx == (by - ay) / cy)
    return 1;
  long long x = (b * cy - a * cx) / (cy * cy + cx * cx);
  long long y = (a * cy + b * cx) / (cy * cy + cx * cx);
  if (x < 0 || y < 0) return 0;
  if (y * cy - x * cx != a || x * cy + y * cx != b) return 0;
  return 1;
}
int gao(long long ax, long long ay, long long bx, long long by, long long cx,
        long long cy) {
  int ans = 0;
  ans |= gao2(ax, ay, bx, by, cx, cy);
  ans |= gao2(ax, ay, by, -bx, cx, cy);
  ans |= gao2(ax, ay, -bx, -by, cx, cy);
  ans |= gao2(ax, ay, -by, bx, cx, cy);
  return ans;
}
int main() {
  cin >> A.x >> A.y >> B.x >> B.y >> C.x >> C.y;
  int ans = 0;
  ans |= gao(A.x, A.y, B.x, B.y, C.x, C.y);
  ans |= gao(A.y, -A.x, B.x, B.y, C.x, C.y);
  ans |= gao(-A.x, -A.y, B.x, B.y, C.x, C.y);
  ans |= gao(-A.y, A.x, B.x, B.y, C.x, C.y);
  cout << (ans == 1 ? "YES" : "NO") << endl;
  return 0;
}
