func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n;     cin >> n;     for (int i = 0; i < n; ++i) {       int k;       cin >> k;       bool ok = true;       int pa = 0, pb = 0;       for (int j = 0; j < k; ++j) {         int a, b;         cin >> a >> b;         if (a < pa || b < pb) ok = false;         if (a == pa && b != pb) ok = false;         if (a > pa && (a - pa) < (b - pb)) ok = false;         pa = a;         pb = b;       }       cout << (ok ?  YES  :  NO ) << endl;     }   }   