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;
bool valid(long long num, long long den) {
  if (den == 0) {
    return num == 0;
  } else {
    return (num % den) == 0;
  }
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
bool valid(long long a, long long b, long long c) {
  if (a == 0 && b == 0) {
    return c == 0;
  }
  if (a < 0) {
    a = -a;
  }
  if (b < 0) {
    b = -b;
  }
  return c % gcd(a, b) == 0;
}
int main() {
  long long ax, ay, bx, by, cx, cy;
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  long long a_x = -ay, a_y = ax;
  long long c_x = -cy, c_y = cx;
  for (long long a = -1; a <= 1; ++a) {
    for (long long a_ = -1; a_ <= 1; ++a_) {
      if (abs(a) + abs(a_) == 1) {
        long long X = bx - a * ax - a_ * a_x;
        long long Y = by - a * ay - a_ * a_y;
        long long num1 = X * c_y - Y * c_x;
        long long den1 = cx * c_y - cy * c_x;
        long long num2 = X * cy - Y * cx;
        long long den2 = c_x * cy - c_y * cx;
        bool ok;
        if (den1 != 0 && den2 != 0) {
          ok = (num1 % den1) == 0 && (num2 % den2) == 0;
        } else {
          if (cx == 0 && c_x == 0) {
            ok = X == 0 && valid(cy, c_y, Y);
          } else if (cy == 0 && c_y == 0) {
            ok = Y == 0 && valid(cx, c_x, X);
          } else {
            if (cx == 0) {
              ok = (X % c_x) == 0 && (Y % c_y) == 0 && X / c_x == Y / c_y;
            } else if (c_x == 0) {
              ok = (X % cx) == 0 && (Y % cy) == 0 && X / cx == Y / cy;
            } else {
              ok = valid(cx, c_x, X) && X * cy == Y * cx;
            }
          }
        }
        if (ok) {
          cout << "YES" << endl;
          return 0;
        }
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
