#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int p = 0, q = 0, ok = 1;
    while (n--) {
      int a, b;
      cin >> a >> b;
      if (a - p < b - q) ok = false;
      if (p > a || q > b) ok = false;
      if (a < b) ok = false;
      p = a, q = b;
    }
    cout << (ok ? "YES" : "NO") << '\n';
  }
  return 0;
}
