func_code_string: #include <bits/stdc++.h>   using namespace std;   const int dx[4] = {0, 0, -1, 1};   const int dy[4] = {-1, 1, 0, 0};   int main() {     int i, j, k, n;     long int mx, mn, sm = 0;     int t;     cin >> t;     while (t--) {       int f = 0;       cin >> n;       vector<pair<int, int>> v(n);       for (i = 0; i < n; i++) {         int a, b;         cin >> a >> b;         v[i] = (make_pair(a, b));       }       if (v[0].first < v[0].second) f = 1;       for (i = 1; i < n; i++) {         int x = v[i].first - v[i - 1].first;         int y = v[i].second - v[i - 1].second;         if (x < 0 || y < 0 || (v[i].first < v[i].second) ||             (v[i - 1].first < v[i - 1].second) || y > x) {           f = 1;           break;         }       }       if (f)         cout <<  NO               <<   n ;       else {         cout <<  YES               <<   n ;       }     }   }   