#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
long long q, n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> q;
  while (q--) {
    cin >> n;
    long long p = 0, c = 0;
    long long ap, ac;
    bool t = 1;
    for (long long i = 0; i < n; ++i) {
      cin >> ap >> ac;
      if (ap < ac) t = 0;
      if ((ap < p) || (ac < c)) t = 0;
      if ((ap - p) < (ac - c)) t = 0;
      p = ap;
      c = ac;
    }
    cout << (t ? "YES" : "NO") << "\n";
  }
}
