#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Vi = vector<int>;
using Pii = pair<int, int>;
int uplg(int n) { return 32 - __builtin_clz(n); }
int uplg(ll n) { return 64 - __builtin_clzll(n); }
void run();
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(18);
  run();
  return 0;
}
void run() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<Pii> stats(n);
    for (auto& k : (stats)) cin >> k.first >> k.second;
    bool ans = 1;
    if (stats[0].first < stats[0].second) {
      ans = 0;
    } else {
      for (int i = (1); i < (n); i++) {
        int a = stats[i].first - stats[i - 1].first;
        int b = stats[i].second - stats[i - 1].second;
        if (a < 0 || b < 0 || a < b) {
          ans = 0;
          break;
        }
      }
    }
    cout << (ans ? "YES\n" : "NO\n");
  }
}
