#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } // sign of permutation int sgn(vector &p) { int n = p.size(); int res = 1; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (p[i] > p[j]) { res *= -1; } } } return res; } // det long long det(vector> &a) { int n = a.size(); long long res = 0; vector p(n); iota(p.begin(), p.end(), 0); do { long long cur = 1; for (int i = 0; i < n; i++) { cur *= a[i][p[i]]; } res += cur * sgn(p); } while (next_permutation(p.begin(), p.end())); return res; } bool is_collinear(long long ax, long long ay, long long bx, long long by, long long cx, long long cy) { return (bx - ax) * (cy - ay) == (by - ay) * (cx - ax); } int main() { fast_io(); long long ax, ay, bx, by, cx, cy, dx, dy; cin >> ax >> ay >> bx >> by >> cx >> cy >> dx >> dy; if (is_collinear(ax, ay, bx, by, cx, cy) && is_collinear(ax, ay, bx, by, dx, dy)) { cout << "NO" << endl; return 0; } vector> a = {{ax, ay, ax * ax + ay * ay, 1}, {bx, by, bx * bx + by * by, 1}, {cx, cy, cx * cx + cy * cy, 1}, {dx, dy, dx * dx + dy * dy, 1}}; cout << (det(a) == 0 ? "YES" : "NO") << endl; }