#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
int main() {
  long long t;
  scanf("%lld", &t);
  ;
  while (t--) {
    long long n;
    scanf("%lld", &n);
    ;
    long long pla[n];
    long long clr[n];
    for (int i = 0; i < n; i++) {
      long long a, b;
      cin >> (a) >> (b);
      pla[i] = a;
      clr[i] = b;
    }
    long long temp = 0;
    for (int i = 1; i < n; i++) {
      if (pla[i] < pla[i - 1]) {
        temp = 1;
        break;
      }
    }
    if (temp) {
      cout << ("NO") << endl;
      continue;
    }
    for (int i = 1; i < n; i++) {
      if (clr[i] < clr[i - 1]) {
        temp = 1;
        break;
      }
    }
    if (temp) {
      cout << ("NO") << endl;
      continue;
    }
    for (int i = 0; i < n; i++) {
      if (clr[i] > pla[i]) {
        temp = 1;
        break;
      }
    }
    if (temp) {
      cout << ("NO") << endl;
      continue;
    }
    for (int i = 1; i < n; i++) {
      if ((pla[i] - pla[i - 1]) < (clr[i] - clr[i - 1])) {
        temp = 1;
        break;
      }
    }
    if (temp) {
      cout << ("NO") << endl;
    } else
      cout << ("YES") << endl;
  }
  return (0);
}
