#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, p, c, maxC = 0, maxP = 0;
  cin >> t;
  while (t--) {
    cin >> n;
    string ans = "YES";
    int maxC = 0, maxP = 0;
    while (n--) {
      cin >> p >> c;
      if (p < maxP || c < maxC || p - maxP < c - maxC) {
        ans = "NO";
      }
      maxP = p;
      maxC = c;
    }
    cout << ans << endl;
  }
  return 0;
}
