#include <bits/stdc++.h>
using namespace std;
struct Point {
  long double x, y;
  Point(){};
  long double dist(Point b) {
    return sqrt((b.x - x) * (b.x - x) + (b.y - y) * (b.y - y));
  }
};
int main() {
  Point a, b, c;
  cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y;
  long double k = a.dist(b);
  long double l = c.dist(b);
  if (k == l && k + l != a.dist(c))
    cout << "YES";
  else
    cout << "NO";
}
