#include <bits/stdc++.h>
using namespace std;
bool comp(string a, string b) { return a.length() < b.length(); }
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> p;
    vector<int> c;
    for (int i = 0; i < n; i++) {
      int x, y;
      cin >> x >> y;
      p.push_back(x);
      c.push_back(y);
    }
    bool flag = true;
    if (p[0] < c[0]) {
      cout << "NO" << endl;
      continue;
    }
    for (int i = 1; i < n; i++) {
      if (p[i] - p[i - 1] < 0) {
        flag = false;
        break;
      }
      if (p[i] - p[i - 1] < c[i] - c[i - 1]) {
        flag = false;
        break;
      }
      if (c[i] - c[i - 1] < 0) {
        flag = false;
        break;
      }
      if (c[i] > p[i]) {
        flag = false;
        break;
      }
    }
    if (n == 1) {
      if (p[0] == c[0] || p[0] >= c[0]) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
      continue;
    }
    if (flag == false) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
}
