#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    int a[n][2];
    for (int i = 0; i < n; i++) {
      cin >> a[i][0] >> a[i][1];
    }
    if (a[0][0] < a[0][1]) {
      cout << "NO\n";
      continue;
    }
    int flag = 0;
    for (int i = 1; i < n; i++) {
      if (a[i][0] < a[i - 1][0] || a[i][1] < a[i - 1][1] || a[i][0] < a[i][1] ||
          (a[i][0] - a[i - 1][0]) < a[i][1] - a[i - 1][1]) {
        cout << "NO\n";
        flag = 1;
        break;
      }
    }
    if (flag == 0) cout << "YES\n";
  }
  return 0;
}
