#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, flag;
  scanf("%d", &t);
  for (int i = 0; i < t; i++) {
    scanf("%d", &n);
    flag = 1;
    int p, c, x, y;
    p = 0;
    c = 0;
    for (int j = 0; j < n; j++) {
      scanf("%d%d", &x, &y);
      if (x < p || y < c || y - c > x - p) flag = 0;
      p = x;
      c = y;
    }
    flag == 1 ? printf("YES\n") : printf("NO\n");
  }
  return 0;
}
