#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, temp1, temp2, i, k = 0;
    vector<int> a;
    ;
    vector<int> b;
    ;
    cin >> n;
    for (int i = 0; i <= n - 1; i++) {
      cin >> temp1 >> temp2;
      a.push_back(temp1);
      b.push_back(temp2);
    }
    if (a[0] < b[0])
      k++;
    else {
      for (int i = 0; i <= n - 2; i++) {
        if (a[i + 1] < a[i] || b[i + 1] < b[i]) {
          k++;
          break;
        } else if (a[i + 1] == a[i]) {
          if (b[i + 1] != b[i]) {
            k++;
            break;
          }
        } else if ((a[i + 1] - a[i]) > 0) {
          if ((b[i + 1] - b[i]) > (a[i + 1] - a[i])) {
            k++;
            break;
          }
        }
      }
    }
    if (k == 1)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
  return 0;
}
