#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
constexpr long long MOD = 1000000007LL;
template <class T, class U>
inline bool chmax(T &a, U b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T, class U>
inline bool chmin(T &a, U b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
void solve() {
  int N;
  cin >> N;
  vector<pair<int, int> > A;
  for (int i = 0; i < (N); ++i) {
    int a, b;
    cin >> a >> b;
    A.emplace_back(a, b);
  }
  int na = 0, nb = 0;
  bool ok = true;
  for (int i = 0; i < (N); ++i) {
    if (A[i].first < na) ok = false;
    if (A[i].second < nb) ok = false;
    if (A[i].first - na < A[i].second - nb) ok = false;
    na = A[i].first;
    nb = A[i].second;
  }
  cout << (ok ? "YES" : "NO") << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int Q;
  cin >> Q;
  while (Q--) {
    solve();
  }
}
