#include <bits/stdc++.h>
using namespace std;
int main() {
  int cases;
  cin >> cases;
  while (cases--) {
    int n;
    cin >> n;
    int plays = 0, clears = 0;
    int plays_old = 0, clears_old = 0;
    bool poss = true;
    for (int i = 0; i < n; i++) {
      cin >> plays >> clears;
      int new_plays = plays - plays_old;
      int new_clears = clears - clears_old;
      if (new_clears > new_plays) {
        poss = false;
      } else if (new_plays < 0 || new_clears < 0) {
        poss = false;
      }
      plays_old = plays;
      clears_old = clears;
    }
    cout << (poss ? "YES" : "NO") << endl;
  }
}
