#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long x, y, max1 = 0, max2 = 0, c = 0;
    for (long long i = 0; i < n; i++) {
      cin >> x >> y;
      if (x < max1 || y < max2 || x < y) c = 1;
      if (x - max1 < y - max2) c = 1;
      max1 = x;
      max2 = y;
    }
    if (c == 1)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
}
