#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int it = 0; it < t; it++) {
    int n;
    cin >> n;
    int p[n], c[n];
    for (int i = 0; i < n; i++) cin >> p[i] >> c[i];
    string ans = "YES";
    if (n == 1 && p[0] < c[0]) ans = "NO";
    for (int i = 0; i < n - 1; i++) {
      if (p[i] < c[i] || p[i + 1] < p[i] || c[i + 1] < c[i] ||
          p[i + 1] - p[i] < c[i + 1] - c[i]) {
        ans = "NO";
        break;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
