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