#include <bits/stdc++.h>
using namespace std;
int main() {
  int tc, n, p1, c1, p2, c2;
  bool valid;
  scanf("%d", &tc);
  while (tc--) {
    scanf("%d", &n);
    p1 = c1 = 0;
    valid = true;
    while (n--) {
      scanf("%d %d", &p2, &c2);
      if ((p2 < p1) || (c2 < c1) || (p2 - c2 < p1 - c1)) valid = false;
      p1 = p2;
      c1 = c2;
    }
    if (valid)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
