#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    std::vector<pair<long long, long long> > v(n);
    for (int i = 0; i < n; i++) {
      cin >> v[i].first >> v[i].second;
    }
    if (v[0].first < v[0].second) {
      cout << "NO"
           << "\n";
      continue;
    }
    bool ok = true;
    for (int i = 1; i < n; i++) {
      if (v[i].first < v[i].second) ok = false;
      if (v[i].first < v[i - 1].first) ok = false;
      if (v[i].second < v[i - 1].second) ok = false;
      if ((v[i].first - v[i - 1].first) < (v[i].second - v[i - 1].second))
        ok = false;
    }
    if (ok)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
  return 0;
}
