#include <bits/stdc++.h>
using namespace std;
void testcase() {
  int n;
  cin >> n;
  pair<long long int, long long int> arr[n];
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i].first;
    cin >> arr[i].second;
  }
  long long int strt = 0;
  long long int end = 0;
  for (long long int i = 0; i < n; i++) {
    int plays = arr[i].first - strt;
    int clears = arr[i].second - end;
    strt = arr[i].first;
    end = arr[i].second;
    if (plays >= 0 and clears >= 0) {
      if (plays >= clears) {
        continue;
      } else {
        cout << "NO\n";
        return;
      }
    } else {
      cout << "NO\n";
      return;
    }
  }
  cout << "YES\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    testcase();
  }
  return 0;
}
