#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void ZZ(const char* name, Arg1&& arg1) {
  std::cerr << name << " = " << arg1 << "\n";
}
template <typename Arg1, typename... Args>
void ZZ(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " = " << arg1;
  ZZ(comma, args...);
}
template <typename Arg1>
void outn(Arg1&& arg1) {
  cout << arg1 << "\n";
}
template <typename Arg1, typename... Args>
void outn(Arg1&& arg1, Args&&... args) {
  cout << arg1 << " ";
  outn(args...);
}
template <typename Arg1>
void outs(Arg1&& arg1) {
  cout << arg1 << " ";
}
template <typename Arg1, typename... Args>
void outs(Arg1&& arg1, Args&&... args) {
  cout << arg1 << " ";
  outs(args...);
}
template <typename Arg1>
void inp(Arg1&& arg1) {
  cin >> arg1;
}
template <typename Arg1, typename... Args>
void inp(Arg1&& arg1, Args&&... args) {
  cin >> arg1;
  inp(args...);
}
inline long long int mulm(long long int a, long long int b, long long int m) {
  a = ((a % m) * (b % m)) % m;
  return a;
}
template <typename T>
T expo(T e, T n) {
  T x = 1, p = e;
  while (n) {
    if (n & 1) x = x * p;
    p = p * p;
    n >>= 1;
  }
  return x;
}
template <typename T>
T powerm(T e, T n, T m) {
  T x = 1, p = e;
  while (n) {
    if (n & 1) x = mulm(x, p, m);
    p = mulm(p, p, m);
    n >>= 1;
  }
  return x;
}
inline long long int subm(long long int a, long long int b, long long int m) {
  a = (a - b + m) % m;
  return a;
}
inline long long int addm(long long int a, long long int b, long long int m) {
  a = (a + b) % m;
  return a;
}
inline void unset_bit_at(long long int& n, long long int b) {
  n &= ~(1ll << b);
}
inline void set_bit_at(long long int& n, long long int b) { n |= (1ll << b); }
inline long long int is_setat(long long int n, long long int b) {
  return (n >> b) & 1;
}
inline long long int get_lastsetbit(long long int n) { return n & (-n); }
inline long long int pow2(long long int n) { return (1ll << n); }
const long long int MOD = 1000000007;
const long long int MX6 = 5000005;
const long long int MAX = 1234567;
const long long int MX5 = 500005;
const long long int INF = 1e18 + 7;
const long long int MX3 = 5005;
long long int n;
bool dp[1005][1005];
void solve() {
  inp(n);
  vector<pair<long long int, long long int> > stat(n);
  bool ok = true;
  for (long long int i = 0; i < n; i++) {
    cin >> stat[i].first >> stat[i].second;
  }
  for (long long int i = 0; i < n; i++) {
    if (stat[i].second > stat[i].first) {
      outs("NO");
      return;
    }
  }
  for (long long int i = 1; i < n; i++) {
    if (stat[i].first == stat[i - 1].first) {
      if (stat[i].second != stat[i - 1].second) {
        outs("NO");
        return;
      }
    } else if (stat[i].first > stat[i - 1].first) {
      if (stat[i].second < stat[i - 1].second) {
        outs("NO");
        return;
      } else if (stat[i].second > stat[i - 1].second) {
        long long int playdiff = stat[i].first - stat[i - 1].first;
        long long int clrdiff = stat[i].second - stat[i - 1].second;
        if (clrdiff > playdiff) {
          outs("NO");
          return;
        }
      }
    } else {
      outs("NO");
      return;
    }
    if (stat[i].first - stat[i].second < stat[i - 1].first - stat[i].second) {
      outs("NO");
      return;
    }
  }
  outs("YES");
}
int32_t main() {
  long long int t;
  t = 1;
  cin.sync_with_stdio(0), cin.tie(0);
  cin >> t;
  while (t--) {
    solve();
    cout << "\n";
    ;
  }
  return 0;
}
