#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  while (a != 0) {
    T temp = a;
    a = b % a;
    b = temp;
  }
  return b;
}
template <class T>
T egcd(T a, T b, T &x, T &y) {
  T gcd, xt, yt;
  if (a == 0) {
    gcd = b;
    x = 0, y = 1;
  } else {
    gcd = egcd(b % a, a, xt, yt);
    x = yt - (b / a) * xt;
    y = xt;
  }
  return gcd;
}
template <class T>
T expo(T base, T exp, T mod) {
  T res = 1;
  base = base % mod;
  while (exp > 0) {
    if (exp & 1) res = (res * base) % mod;
    exp = exp >> 1;
    base = (base * base) % mod;
  }
  return res;
}
template <class T>
T modinv(T a, T mod) {
  T x, y;
  egcd<T>(a, mod, x, y);
  while (x < 0) x += mod;
  while (x >= mod) x -= mod;
  return x;
}
template <class T>
T modinvfermat(T a, T mod) {
  return expo<T>(a, mod - 2, mod);
}
template <class T>
bool rev(T a, T b) {
  return a > b;
}
template <class T>
long long maxpower(T a, T b) {
  long long ans = 0;
  while (a > 0 && a % b == 0) {
    ans++;
    a /= b;
  }
  return ans;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<pair<int, int>> v(n);
    for (auto i = 0; i < n; i++) {
      int a, b;
      cin >> a >> b;
      v[i] = make_pair(a, b);
    }
    int flag = 0;
    if (v[0].first < v[0].second) {
      cout << "NO" << endl;
    } else {
      for (auto i = 1; i < n; i++) {
        if (v[i].first - v[i - 1].first >= v[i].second - v[i - 1].second) {
          if (v[i].first - v[i - 1].first >= 0 &&
              v[i].second - v[i - 1].second >= 0) {
          } else {
            cout << "NO" << endl;
            flag = 1;
            break;
          }
        } else {
          cout << "NO" << endl;
          flag = 1;
          break;
        }
      }
      if (flag == 0) cout << "YES" << endl;
    }
  }
}
