#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  for (int w = 0; w < q; w++) {
    int n;
    cin >> n;
    int p[n], c[n];
    for (int i = 0; i < n; i++) {
      cin >> p[i] >> c[i];
    }
    bool isValid = true;
    if (p[0] < c[0]) {
      isValid = false;
      cout << "NO\n";
      continue;
    }
    for (int i = 1; i < n; i++) {
      if (p[i] < p[i - 1] || c[i] < c[i - 1] || c[i] > p[i] ||
          (c[i] - c[i - 1]) > (p[i] - p[i - 1])) {
        isValid = false;
        break;
      }
    }
    if (isValid)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
