#include <bits/stdc++.h>
using namespace std;
long long fx[] = {1, 1, 0, -1, -1, -1, 0, 1};
long long fy[] = {0, 1, 1, 1, 0, -1, -1, -1};
long long ar[5000005], br[500005];
vector<long long> a, b, c;
map<long long, long long> m1, m2, m3;
void Execute() {
  long long N, NB, VAL, A, B, C, G, INC, DEC, L, R, D, mx = -1, mx1 = -1;
  long long plays, clears;
  cin >> N;
  long long prev = 0, pre = 0, ok = 1;
  for (long long i = (1); i <= (N); i++) {
    cin >> L >> R;
    if (i == 1) {
      plays = L;
      clears = R;
      if (L < R) ok = 0;
    } else if (i >= 2) {
      long long dif = L - plays;
      long long dif1 = R - clears;
      if (dif >= 0 && dif1 >= 0 && L >= R) {
        if (dif >= dif1) {
          plays = L;
          clears = R;
        } else {
          ok = 0;
          plays = L;
          clears = R;
        }
      } else {
        ok = 0;
        plays = L;
        clears = R;
      }
    }
    plays = L;
    clears = R;
  }
  if (ok == 0)
    cout << ("NO") << endl;
  else
    cout << ("YES") << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int ___T;
  cin >> ___T;
  for (int cs = 1; cs <= ___T; cs++) {
    Execute();
  }
}
