#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int i, j, k, l, t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<pair<long long int, long long int>> v;
    for (i = 0; i < n; i++) {
      cin >> l >> j;
      v.push_back(make_pair(l, j));
    }
    long long int cnt = 0;
    if (v[0].second > v[0].first) {
      cout << "NO" << endl;
      continue;
    }
    for (i = 1; i < n; i++) {
      if (v[i].first < v[i - 1].first || v[i].second < v[i - 1].second) {
        cnt++;
        cout << "NO" << endl;
        break;
      } else if (v[i].first == v[i - 1].first &&
                 v[i].second != v[i - 1].second) {
        cnt++;
        cout << "NO" << endl;
        break;
      } else if (v[i].second > v[i].first) {
        cnt++;
        cout << "NO" << endl;
        break;
      } else if (v[i].second - v[i - 1].second > v[i].first - v[i - 1].first) {
        cnt++;
        cout << "NO" << endl;
        break;
      }
    }
    if (cnt == 0) cout << "YES" << endl;
  }
}
