#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(NULL);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long p, c, lp, lc;
    long long pos = 0;
    for (long long i = 0; i < n; i++) {
      cin >> p >> c;
      if (i > 0) {
        if (p < c) {
          pos = 1;
          continue;
        }
        if (c < lc) {
          pos = 1;
          continue;
        }
        if (p < lp) {
          pos = 1;
          continue;
        }
        if (c - lc > p - lp) {
          pos = 1;
        }
      }
      if (i == 0) {
        if (p < c) {
          pos = 1;
          continue;
        }
      }
      lc = c;
      lp = p;
    }
    if (pos)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
