#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int o, n, x, z, i, t, d, w, j, p, h, max = 0, y, k, m, l, r, q;
  cin >> t;
  while (t--) {
    d = 0;
    cin >> n;
    long long int a[n][2];
    for (i = 0; i < n; i++) {
      for (j = 0; j < 2; j++) cin >> a[i][j];
    }
    if (n == 1) {
      if (a[0][0] >= a[0][1])
        cout << "YES";
      else
        cout << "NO";
    } else {
      for (i = 1; i < n; i++) {
        l = a[i][0];
        k = a[i][1];
        x = a[i - 1][0];
        o = a[i - 1][1];
        if ((l >= k) && (l >= x) && (x >= o) && (k >= o)) {
          if ((k - o) <= (l - x)) {
            continue;
          } else {
            d++;
            break;
          }
        } else {
          d++;
          break;
        }
      }
      if (d == 1)
        cout << "NO";
      else
        cout << "YES";
    }
    cout << endl;
  }
}
