#include using namespace std; using ll = long long; #define all(a) (a).begin(), (a).end() #define pb push_back #define fi first #define se second mt19937_64 rng(chrono::system_clock::now().time_since_epoch().count()); const ll MOD1000000007 = 1000000007; const ll MOD998244353 = 998244353; const ll MOD[3] = {999727999, 1070777777, 1000000007}; const ll LINF = 1LL << 60LL; const int IINF = (1 << 30) - 2; using ld = long double; #define eps 1e-40 ld dist(pair x, pair y){ return sqrt((x.fi-y.fi)*(x.fi-y.fi) + (x.se-y.se)*(x.se-y.se)); } void solve(){ vector> P(4); for(int i=0; i<4; i++) cin >> P[i].fi >> P[i].se; vector p(4); for(int i=0; i<4; i++) p[i] = i; do{ ld ab = dist(P[p[0]], P[p[1]]); ld cd = dist(P[p[2]], P[p[3]]); ld ad = dist(P[p[0]], P[p[3]]); ld bc = dist(P[p[1]], P[p[2]]); ld ac = dist(P[p[0]], P[p[2]]); ld bd = dist(P[p[1]], P[p[3]]); if(ab*cd+ad*bc-ac*bd < eps){ cout << "YES\n"; return; } }while(next_permutation(all(p))); cout << "NO\n"; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int T=1; //cin >> T; while(T--) solve(); }