#include <bits/stdc++.h>
using namespace std;
long long t, n, p[100009], c[100009], flag;
int main() {
  cin >> t;
  while (t--) {
    cin >> n;
    flag = 0;
    for (int i = 0; i < n; i++) {
      cin >> p[i] >> c[i];
      if (i)
        if (c[i] > p[i] || p[i] < p[i - 1] || c[i] < c[i - 1] ||
            ((c[i] - c[i - 1]) > (p[i] - p[i - 1])))
          flag = 1;
    }
    if (flag || (c[0] > p[0]))
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
}
