#ifdef NACHIA #define _GLIBCXX_DEBUG #else #define NDEBUG #endif #include #include #include #include using i64 = long long; using u64 = unsigned long long; #define rep(i,n) for(int i=0; i void chmin(A& l, const A& r){ if(r < l) l = r; } template void chmax(A& l, const A& r){ if(l < r) l = r; } using namespace std; #include using Modint = atcoder::static_modint<998244353>; void testcase(){ i64 a[3], b[3], c[3] = {}; i64 X[4][2] = {}; rep(i,4) rep(j,2) cin >> X[i][j]; rep(i,3) a[i] = X[i][0] - X[3][0]; rep(i,3) b[i] = X[i][1] - X[3][1]; rep(i,3) c[i] = a[i] * a[i] + b[i] * b[i]; i64 det = 0; rep(i,3){ det += a[(i+0)%3] * b[(i+1)%3] * c[(i+2)%3]; det -= a[(i+0)%3] * b[(i+2)%3] * c[(i+1)%3]; } if(a[0] * b[1] - a[1] * b[0] == 0) det = 1; cout << (det == 0 ? "YES\n" : "NO\n"); } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); testcase(); return 0; }