func_code_string: #include <bits/stdc++.h>   #pragma GCC optimize( Ofast )   #pragma GCC optimize( unroll-loops )   using namespace std;   using ll = long long int;   using pii = pair<int, int>;   using pll = pair<ll, ll>;   using vi = vector<int>;   using vl = vector<ll>;   using vpii = vector<pii>;   using vpll = vector<pll>;   using vvi = vector<vi>;   using vvl = vector<vl>;   using vvpii = vector<vpii>;   using vvpll = vector<vpll>;   using dd = double;   using ldd = long double;   using vd = vector<dd>;   inline void IO() {     fclose(stderr);     ios::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     cout << setiosflags(ios::fixed) << setprecision(15);     cerr << setiosflags(ios::fixed) << setprecision(15);   }   const ll MOD = 1e9 + 7;   const int INF = 2e9;   const ll INF64 = 9e18;   const double PI = 3.1415926535897932;   pll A[4], B[4];   bool same(pll &a, pll &c, pll &d) {     ;     if (a == c) return true;     if (a == d) {       swap(c, d);       return true;     }     return false;   }   bool sames() {     if (!same(B[0], A[1], B[1])) {       if (same(B[0], A[2], B[2])) {         swap(A[2], A[1]);         swap(B[2], B[1]);       } else if (same(B[0], A[3], B[3])) {         swap(A[3], A[1]);         swap(B[3], B[1]);       } else         return false;     }     if (!same(B[1], A[2], B[2])) {       if (same(B[1], A[3], B[3])) {         swap(A[2], A[3]);         swap(B[2], B[3]);       } else         return false;     }     if (!same(B[2], A[3], B[3])) return false;     return B[3] == A[0];   }   bool side(pll &a, pll b) { return a.first == b.first || a.second == b.second; }   bool sides() {     for (ll i = (0); i < (4); ++i)       if (!side(A[i], B[i])) return false;     return true;   }   bool check() {     if (!sames()) {       ;       return false;     }     if (!sides()) {       ;       return false;     }     if ((A[0].first - A[2].first) * (A[0].second - A[2].second) == 0 ||         (A[1].first - A[3].first) * (A[1].second - A[3].second) == 0) {       ;       return false;     }     return true;   }   int main() {     IO();     for (ll i = (0); i < (4); ++i)       cin >> A[i].first >> A[i].second >> B[i].first >> B[i].second;     if (check())       cout <<  YES n ;     else       cout <<  NO n ;     ;     return 0;   }   