#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1), eps = 1e-6;
const int dx[4] = {-1, 1, 0, 0}, dy[4] = {0, 0, -1, 1};
const int N = 1e6 + 5, M = 2e6 + 5, mod = 1e9 + 7;
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;
}
