#include <bits/stdc++.h>
using namespace std;
int const N = 1000020;
double m(double ax, double ay, double bx, double by) {
  if (ax - bx == 0) return 1e9 + 2;
  return (by - ay) / (bx - ax);
}
double d(long long ax, long long ay, long long bx, long long by) {
  return (ax - bx) * (ax - bx) + (by - ay) * (by - ay);
}
double const EPS = 1e-12;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int ax, ay, bx, by, cx, cy;
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  if (fabs(m(ax, ay, bx, by) - m(bx, by, cx, cy)) > EPS and
      d(ax, ay, bx, by) == d(bx, by, cx, cy))
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
