#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int pp = 0, ps = 0;
    long long int a[n][2];
    for (long long int i = 0; i < n; i++) {
      for (long long int j = 0; j < 2; j++) {
        cin >> a[i][j];
      }
    }
    long long int ans = false;
    for (long long int i = 0; i < n; i++) {
      if ((a[i][1] > a[i][0]) || (a[i][0] < pp) || (a[i][1] < ps) ||
          (a[i][1] - ps > a[i][0] - pp)) {
        cout << "NO" << endl;
        ans = true;
        break;
      } else {
        pp = a[i][0];
        ps = a[i][1];
      }
    }
    if (!ans) {
      cout << "YES" << endl;
    }
  }
}
