#include <bits/stdc++.h>
int main() {
  int t;
  for (std::cin >> t; t; t--) {
    int n;
    std::cin >> n;
    int p = 0, c = 0;
    bool ok = true;
    for (size_t i = 0; i < n; i++) {
      int pp, cc;
      std::cin >> pp >> cc;
      ok &= (pp - cc) >= (p - c) && pp >= p && cc >= c;
      p = pp;
      c = cc;
    }
    std::cout << (ok ? "YES" : "NO") << std::endl;
  }
  return 0;
}
