#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<pair<long long, long long> > v;
    for (long long i = 0; i < n; i++) {
      long long x, y;
      cin >> x >> y;
      v.push_back(make_pair(x, y));
    }
    int f = 0, c = 0;
    for (int i = 0; i < n; i++) {
      if (v[i].first >= v[i].second) {
        for (int j = 0; j < i; j++) {
          if (v[j].second <= v[i].second && v[j].first <= v[i].first &&
              v[i].first - v[j].first >= v[i].second - v[j].second) {
            c++;
          } else
            f = 1;
        }
        if (f == 1) break;
      } else {
        f = 1;
        break;
      }
    }
    if (f == 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
