#include <bits/stdc++.h>
using namespace std;
int tc = 1;
const int mod = 1e9 + 7;
const long long Inf = (long long)2e18 + 5;
const int N = 2e5 + 5;
int solve() {
  int n, a, b;
  cin >> n;
  int x = 0, y = 0;
  bool v = true;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    if (y > b || x > a) {
      v = false;
    } else if (b > y && a <= x) {
      v = false;
    } else if (a < b)
      v = false;
    else if (a - x < b - y)
      v = false;
    x = a;
    y = b;
  }
  if (v)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
int main() {
  int test = 1;
  scanf("%d", &test);
  while (test--) solve();
  return 0;
}
