#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    int a[n], b[n];
    for (int i = 0; i < n; i++) scanf("%d%d", &a[i], &b[i]);
    if (a[0] < b[0])
      printf("NO\n");
    else {
      int f = 1;
      for (int i = 1; i < n; i++) {
        if (a[i] < a[i - 1] || b[i] < b[i - 1]) {
          f = 0;
          break;
        }
        if (a[i] - a[i - 1] < b[i] - b[i - 1]) {
          f = 0;
          break;
        }
      }
      if (f)
        printf("YES\n");
      else
        printf("NO\n");
    }
  }
  return 0;
}
