#include <bits/stdc++.h>
const long long LINF = 1e18;
const int INF = 1e9;
const int M = 1e9 + 7;
const double EPS = 1e-9;
using namespace std;
int main(int argc, const char* argv[]) {
  std::ios_base::sync_with_stdio(0);
  int T;
  cin >> T;
  for (int t = 0; t < (int)(T); t++) {
    int n;
    cin >> n;
    int pl = 0, cl = 0;
    bool fl = 1;
    for (int i = 0; i < (int)(n); i++) {
      int p, c;
      cin >> p >> c;
      if (p < pl || c < cl) fl = 0;
      if (p - pl < c - cl) fl = 0;
      pl = p;
      cl = c;
    }
    if (fl)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
