#include <bits/stdc++.h>
using namespace std;
int t, n, a[105], b[105];
void solve() {
  for (int i = 1; i <= n; ++i)
    if (a[i] - a[i - 1] < b[i] - b[i - 1] || a[i - 1] > a[i] ||
        b[i - 1] > b[i]) {
      puts("NO");
      return;
    }
  puts("YES");
}
int main() {
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 1; i <= n; ++i) cin >> a[i] >> b[i];
    solve();
  }
  return 0;
}
