#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n;
  long long x, y, contp, contw;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> n;
    string r = "YES";
    contw = 0, contp = 0;
    for (int j = 0; j < n; j++) {
      cin >> x >> y;
      if ((x < contp || y < contw)) r = "NO";
      if (y >= contw && x >= contp) {
        if (y - contw > x - contp) r = "NO";
      }
      contw = y, contp = x;
    }
    cout << r << endl;
  }
  return 0;
}
