#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, flag = 0;
    cin >> n;
    long long l[n], r[n];
    for (int i = 0; i < n; i++) {
      cin >> l[i] >> r[i];
    }
    for (int i = 1; i < n; i++) {
      if (l[i] < l[i - 1] || r[i] < r[i - 1] ||
          (r[i] - r[i - 1]) > (l[i] - l[i - 1]) || l[i] < r[i])
        flag = 1;
    }
    if (n == 1) {
      if (l[0] >= r[0])
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    } else {
      if (flag == 0 && l[0] >= r[0])
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  }
}
