#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  ;
  long double x1, x2, x3, y1, y2, y3;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
  long double x = (y2 - y1) / (x2 - x1);
  long double y = (y3 - y2) / (x3 - x2);
  long double d1 = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
  long double d2 = sqrt((x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2));
  if (d1 != d2 || x == y) {
    return cout << "NO", 0;
  }
  cout << "YES";
}
