#include <bits/stdc++.h>
using namespace std;
string Levelcheck(vector<vector<int> > vec) {
  int n;
  n = vec.size();
  if (vec[0][0] < vec[0][1]) {
    return "NO";
  }
  for (int i = 1; i < n; i++) {
    if (vec[i][0] < vec[i][1]) {
      return "NO";
    }
    if (vec[i][0] < vec[i - 1][0]) {
      return "NO";
    }
    if (vec[i][1] < vec[i - 1][1]) {
      return "NO";
    }
    if ((vec[i][0] - vec[i - 1][0]) < (vec[i][1] - vec[i - 1][1])) {
      return "NO";
    }
  }
  return "YES";
}
int main() {
  int t;
  cin >> t;
  vector<vector<int> > vec;
  vector<int> vec1;
  vector<string> vec2;
  for (int i = 0; i < t; i++) {
    int n;
    cin >> n;
    for (int j = 0; j < n; j++) {
      int a;
      int b;
      cin >> a >> b;
      vec1.push_back(a);
      vec1.push_back(b);
      vec.push_back(vec1);
      vec1.clear();
    }
    string result = Levelcheck(vec);
    vec2.push_back(result);
    vec.clear();
  }
  for (int i = 0; i < t; i++) {
    cout << vec2[i] << endl;
  }
  return 0;
}
