#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int T;
  cin >> T;
  for (int tc = 1; tc <= T; tc++) {
    int n;
    cin >> n;
    vector<pair<int, int> > v(n);
    for (int i = 0; i < n; i++) cin >> v[i].first >> v[i].second;
    bool can = 1;
    for (int i = 0; i < n; i++) {
      int p = v[i].first;
      int c = v[i].second;
      if (c > p) can = 0;
      if (i > 0) {
        int delta_clear = c - v[i - 1].second;
        int delta_play = p - v[i - 1].first;
        if (delta_play < 0 || delta_clear < 0) can = 0;
        if (delta_clear > delta_play) can = 0;
      }
    }
    if (can) {
      cout << "YES\n";
    } else
      cout << "NO\n";
  }
}
