func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long MOD = 1e9 + 7;   const long long INF = 1e18;   const long long MAX = 100100;   void pre() {}   void solve() {     long long n;     cin >> n;     vector<long long> p(n), c(n);     for (long long i = 0; i < n; ++i) cin >> p[i] >> c[i];     for (long long i = 0; i < n; ++i) {       if (c[i] > p[i]) {         cout <<  NO               <<   n ;         return;       }     }     for (long long i = 1; i < n; ++i) {       if (p[i] < p[i - 1]) {         cout <<  NO               <<   n ;         return;       }       if (c[i] < c[i - 1]) {         cout <<  NO               <<   n ;         return;       }       if ((p[i] - p[i - 1]) < (c[i] - c[i - 1])) {         cout <<  NO               <<   n ;         return;       }     }     cout <<  YES           <<   n ;   }   signed main() {     ios::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     pre();     long long t = 1;     cin >> t;     for (long long CASE = 1; CASE <= t; ++CASE) {       solve();     }     {};     return 0;   }   