#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x = 0, y = 0, p = 0, q = 0;
    cin >> n;
    bool ans = true;
    for (int i = 1; i <= n; i++) {
      cin >> p >> q;
      if (p < x || q < y)
        ans = false;
      else if (q - y > p - x)
        ans = false;
      x = p;
      y = q;
    }
    if (ans == true)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
