#include <bits/stdc++.h>
using namespace std;
int p[1234], c[1234];
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  int i;
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int i;
    int flag = 0;
    int a = 0, b = 0;
    for (i = 0; i < n; i++) {
      cin >> p[i] >> c[i];
      if (p[i] - a < c[i] - b) {
        flag = 1;
      }
      if (p[i] - a < 0) {
        flag = 1;
      }
      if (c[i] - b < 0) flag = 1;
      a = p[i];
      b = c[i];
    }
    if (flag) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
}
