#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
int p[N], c[N];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    bool fl = 0;
    for (int i = 1; i <= n; i++) scanf("%d%d", &p[i], &c[i]);
    for (int i = 1; i < n; i++)
      if (p[i] > p[i + 1] || c[i] > c[i + 1] ||
          p[i + 1] - p[i] < c[i + 1] - c[i] || p[i] < c[i])
        fl = 1;
    if (p[n] < c[n]) fl = 1;
    if (fl)
      puts("NO");
    else
      puts("YES");
  }
  return 0;
}
