#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, r = 0, s = 0, fl = 0, i;
    cin >> n;
    vector<pair<long long, long long> > vp;
    while (n--) {
      long long p, c;
      cin >> p >> c;
      vp.push_back(make_pair(p, c));
    }
    for (i = 0; i < vp.size(); i++) {
      if (vp[i].first >= r && vp[i].second >= s) {
        if (vp[i].first - r >= vp[i].second - s) {
          r = vp[i].first;
          s = vp[i].second;
        } else {
          fl = 1;
          cout << "NO";
          break;
        }
      } else {
        fl = 1;
        cout << "NO";
        break;
      }
    }
    if (fl == 0) cout << "YES";
    cout << "\n";
  }
  return 0;
}
