#include <bits/stdc++.h>
using namespace std;
vector<string> solve(const vector<vector<pair<int, int>>> _data) {
  vector<string> res;
  int last_t = 0;
  int last_w = 0;
  bool a = false;
  for (vector<pair<int, int>> vec : _data) {
    last_t = vec[0].first;
    last_w = vec[0].second;
    if (last_w > last_t) {
      res.push_back("NO");
      continue;
    } else {
      if (vec.size() > 1) {
        a = false;
        for (int i = 1; i < vec.size(); ++i) {
          last_w = vec[i - 1].second;
          last_t = vec[i - 1].first;
          if (last_t <= vec[i].first && last_w <= vec[i].second) {
            if ((vec[i].second - last_w) > (vec[i].first - last_t)) {
              res.push_back("NO");
              a = true;
              break;
            }
          } else {
            res.push_back("NO");
            a = true;
            break;
          }
        }
        if (!a) res.push_back("YES");
      } else if (vec.size() == 1) {
        res.push_back("YES");
        continue;
      }
    }
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  vector<vector<pair<int, int>>> data(t);
  for (int k = 0; k < t; ++k) {
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i) {
      int v1, v2;
      cin >> v1 >> v2;
      data[k].push_back(make_pair(v1, v2));
    }
  }
  vector<string> _res = solve(data);
  for (string s : _res) cout << s << "\n";
  return 0;
}
