#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long double ax, ay, bx, by, cx, cy;
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  long double d1 = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
  long double d2 = (bx - cx) * (bx - cx) + (by - cy) * (by - cy);
  if ((cx + ax) / 2 == bx && (cy + ay) / 2 == by)
    cout << "NO";
  else if (d1 == d2)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
