#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool isPrime(long long n) {
  long long c;
  if (n <= 1) return false;
  c = sqrt(n);
  for (int i = 2; i <= c; i++)
    if (n % i == 0) return false;
  return true;
}
const long long N = 1e5 + 7;
long long l, k, d, tr, n, m, sum, mini, maxi, a, b, c, x, y;
long long t[N];
set<int> vis;
vector<int> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  for (cin >> tr; tr--;) {
    cin >> n;
    mini = 0;
    a = 0;
    b = 0;
    for (int i = 0; i < n; i++) {
      cin >> x >> y;
      if (x >= a && y >= b) {
        if ((x - a) < (y - b)) {
          mini++;
        }
      } else {
        mini++;
      }
      a = x;
      b = y;
    }
    if (mini) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
}
