#include <bits/stdc++.h>
using namespace std;
long long ax, ay, bx, by, cx, cy;
int main() {
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  long long ff1 = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
  long long ff2 = (bx - cx) * (bx - cx) + (by - cy) * (by - cy);
  if ((bx - ax) * (cy - ay) == (cx - ax) * (by - ay))
    printf("NO\n");
  else if (ff1 == ff2)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
