func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int t;     cin >> t;     while (t--) {       int n;       cin >> n;       pair<int, int> p[n];       for (int i = 0; i < n; i++) {         cin >> p[i].first >> p[i].second;       }       bool check = true;       for (int i = 0; i < n; i++) {         if (p[i].first < p[i].second) check = false;         if (i > 0) {           if (p[i].first == p[i - 1].first) {             if (p[i].second != p[i - 1].second) check = false;           } else if (p[i].first > p[i - 1].first) {             if (p[i].second < p[i - 1].second) check = false;           } else             check = false;           if (p[i].first - p[i - 1].first < p[i].second - p[i - 1].second)             check = false;         }       }       if (check)         cout <<  YES n ;       else         cout <<  NO n ;     }     return 0;   }   