#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > p;
int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    p.clear();
    int n, a, b;
    cin >> n;
    bool value = true;
    for (int i = 0; i < n; ++i) {
      cin >> a >> b;
      if (a < b) value = false;
      if (p.empty())
        p.push_back({a, b});
      else {
        if (a < p.back().first || b < p.back().second ||
            a - p.back().first < b - p.back().second)
          value = false;
        p.push_back({a, b});
      }
    }
    if (value)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
