#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, a, b;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    int ca = 0, cb = 0;
    bool flag = true;
    for (int i = 0; i < n; i++) {
      scanf("%d %d", &a, &b);
      int da = a - ca, db = b - cb;
      if (da < 0 or db < 0) flag = false;
      if (da < db) flag = false;
      ca = a;
      cb = b;
    }
    printf("%s\n", (flag ? "YES" : "NO"));
  }
  return 0;
}
