#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int n;
int p[N], c[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    cin >> n;
    bool success = true;
    for (int i = 1, d = 0; i <= n; i++) {
      cin >> p[i] >> c[i];
      if (p[i] < c[i] || p[i] < p[i - 1] || c[i] < c[i - 1] || p[i] - c[i] < d)
        success = false;
      d = p[i] - c[i];
    }
    cout << (success ? "YES" : "NO") << endl;
  }
  return 0;
}
