#include <bits/stdc++.h>
using namespace std;
const int MAXN = 205;
const long long int mod = 1000000007;
long long int m;
long long int gc(long long int a, long long int b) {
  if (b == 0) return a;
  return gc(b, a % b);
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
vector<bool> prime(100005, true);
vector<long long int> v;
void sieve(long long int n) {
  prime[1] = false;
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (int i = 2; i <= n; i++) {
    if (prime[i] == true) v.push_back(i);
  }
}
bool comp(pair<long long int, long long int>& p1,
          pair<long long int, long long int>& p2) {
  return (p1.second < p2.second);
}
int BIT[1000];
void update(int x, int delta) {
  int n;
  for (; x <= n; x += x & -x) BIT[x] += delta;
}
int query(int x) {
  int sum = 0;
  for (; x > 0; x -= x & -x) sum += BIT[x];
  return sum;
}
vector<vector<long long int> > dp(30005, vector<long long int>(248, -1));
void lcs() {
  vector<int> d;
  int ans, n;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    vector<int>::iterator it = upper_bound(d.begin(), d.end(), x);
    if (it == d.end())
      d.push_back(x);
    else
      *it = x;
  }
  printf("LIS = %d", d.size());
}
long long int dfs(long long int src, long long int p,
                  vector<long long int> adj[], vector<long long int>& sz) {
  sz[src] = 1;
  for (int i = 0; i < adj[src].size(); i++) {
    long long int v = adj[src][i];
    if (v == p) continue;
    sz[src] += dfs(v, src, adj, sz);
  }
  return sz[src];
}
void dfs2(long long int src, long long int p, vector<long long int> adj[],
          vector<long long int>& dp, vector<long long int>& ans,
          long long int m) {
  ans[src] = dp[src];
  for (int i = 0; i < adj[src].size(); i++) {
    long long int v = adj[src][i];
    if (v == p) continue;
    dp[src] /= (dp[v] + 1);
    dp[v] = ((dp[v] % m) * (dp[src] + 1) % m) % m;
    dfs2(v, src, adj, dp, ans, m);
    dp[v] /= (dp[src] + 1);
    dp[src] = ((dp[src] % m) * (dp[v] + 1) % m);
  }
  return;
}
inline long long int add(long long int a, long long int b) {
  return ((a % m) + (b % m)) % m;
}
inline long long int sub(long long int a, long long int b) {
  return ((a % m) - (b % m) + m) % m;
}
inline long long int mul(long long int a, long long int b) {
  return ((a % m) * (b % m)) % m;
}
long long int dfs1(vector<long long int> adj[], long long int src,
                   long long int p, long long int col,
                   vector<long long int>& dp) {
  dp[src] = 1;
  for (int i = 0; i < adj[src].size(); i++) {
    long long int v = adj[src][i];
    if (v == p) continue;
    long long int st = dfs1(adj, v, src, 1, dp);
    if (col == 1) {
      long long int temp = 0;
      temp = add(temp, dfs1(adj, v, src, 0, dp));
      temp = add(temp, st);
      dp[src] = mul(dp[src], temp);
    } else {
      dp[src] = mul(dp[src], st);
    }
  }
  return dp[src];
}
long long int solution(vector<long long int> A, long long int k) {
  long long int N = A.size();
  if (N < k || N < 1 || k < 1) return 0;
  if (N == k) return 1;
  vector<long long int> v1(N, 0);
  vector<long long int> v2(N, 0);
  vector<long long int> v3(N, 0);
  v2[N - 1] = 1;
  v3[A[N - 1] - 1] = 1;
  for (long long int i = N - 2; i >= 0; i--) {
    v2[i] = v2[i + 1];
    if (v3[A[i] - 1] == 0) {
      v2[i]++;
      v3[A[i] - 1] = 1;
    }
  }
  for (long long int j = 1; j < k; j++) {
    fill(v3.begin(), v3.end(), 0);
    v1[N - 1] = 0;
    for (long long int i = N - 2; i >= 0; i--) {
      v1[i] = v1[i + 1];
      v1[i] = v1[i] + v2[i + 1];
      v1[i] = v1[i] - v3[A[i] - 1];
      v3[A[i] - 1] = v2[i + 1];
    }
    v2 = v1;
  }
  return v1[0];
}
long long int recur(long long int idx, long long int sum,
                    vector<pair<long long int, long long int> >& v,
                    vector<long long int>& b, vector<long long int>& pre,
                    vector<long long int>& dp) {
  if (idx == b.size()) return 0;
  if (dp[idx] != -1) return dp[idx];
  long long int temp = INT_MAX;
  temp = min(temp, recur(idx + 1, sum, v, b, pre, dp) + b[idx]);
  for (int i = 0; i < v.size(); i++) {
    long long int x = v[i].first;
    long long int y = v[i].second;
    if (idx + x - 1 >= b.size()) continue;
    long long int calc = pre[idx + x - 1] - pre[idx + y - 1];
    temp = min(temp, recur(idx + x, sum, v, b, pre, dp) + calc);
  }
  dp[idx] = temp;
  return temp;
}
set<pair<long long int, long long int> > temp;
void dfs(long long int src, vector<long long int>& p,
         vector<long long int> adj[], vector<bool>& vis, vector<bool>& v) {
  vector<long long int>::iterator it;
  vis[src] = true;
  for (it = adj[src].begin(); it != adj[src].end(); it++) {
    if ((*it) == p[src]) continue;
    if (!vis[*it]) {
      p[*it] = src;
      dfs((*it), p, adj, vis, v);
    } else {
      if (v[*it] == true)
        continue;
      else {
        long long int c = (*it);
        long long int d = src;
        temp.insert(make_pair(c, d));
        v[c] = true;
        v[d] = true;
        long long int coun = 1;
        while (d != c) {
          temp.insert(make_pair(d, p[d]));
          coun++;
          v[p[d]] = true;
          d = p[d];
        }
      }
    }
  }
}
long long int recur(long long int idx, long long int k, long long int n) {
  if (idx == n) return 1;
  if (idx > n) return 0;
  long long int temp = 0;
  temp += recur(idx + 1, k, n);
  temp += (idx + k, k, n);
  return temp;
}
long long int find(long long int u, vector<long long int>& parent) {
  if (u == parent[u])
    return u;
  else
    return parent[u] = find(parent[u], parent);
}
void unio(long long int u, long long int v, vector<long long int>& parent,
          vector<long long int>& ran, map<long long int, long long int>& m1) {
  u = find(u, parent);
  v = find(v, parent);
  if (u == v) return;
  if (ran[u] >= ran[v]) {
    parent[v] = u;
    ran[u] += v;
    m1[u] += m1[v];
  } else {
    parent[u] = v;
    ran[v] += u;
    m1[v] += m1[u];
  }
}
long long int dfs(long long int src, long long int p, vector<long long int>& a,
                  vector<pair<long long int, long long int> > adj[],
                  vector<long long int>& dp) {
  long long int can1 = 0;
  long long int can2 = 0;
  vector<pair<long long int, long long int> >::iterator it;
  for (it = adj[src].begin(); it != adj[src].end(); it++) {
    if (((*it).first == p)) continue;
    long long int st =
        max(0LL, dfs((*it).first, src, a, adj, dp) - (*it).second);
    if (st > can1) {
      can2 = can1;
      can1 = st;
    } else if (st > can2) {
      can2 = st;
    }
  }
  dp[src] = a[src] + can1 + can2;
  return (max(can1, can2) + a[src]);
}
long long int ans = 0;
vector<vector<long long int> > col(1003, vector<long long int>(1003, -1));
vector<vector<long long int> > store(1003, vector<long long int>(1003, -1));
long long int dfs(vector<vector<char> >& c, vector<vector<bool> >& vis,
                  long long int temp, long long int i, long long int j,
                  bool& check, char ch, long long int color) {
  if (i < 0 || j < 0 || i >= vis.size() || j >= vis[0].size()) return temp;
  if (ch == 'A' && c[i][j] != 'D') return temp;
  if (ch == 'D' && c[i][j] != 'I') return temp;
  if (ch == 'I' && c[i][j] != 'M') return temp;
  if (ch == 'M' && c[i][j] != 'A') return temp;
  if (vis[i][j]) {
    if (c[i][j] == 'D' && color == col[i][j]) {
      check = true;
      cout << color << " " << i << " " << j << endl;
      return 0;
    }
  }
  if (dp[i][j] != -1) return dp[i][j];
  col[i][j] = color;
  vis[i][j] = true;
  long long int cac = 0;
  if (c[i][j] == 'A') {
    ans = max(ans, temp + 1);
    cac = max(cac, dfs(c, vis, temp + 1, i - 1, j, check, c[i][j], color));
    cac = max(cac, dfs(c, vis, temp + 1, i + 1, j, check, c[i][j], color));
    cac = max(cac, dfs(c, vis, temp + 1, i, j + 1, check, c[i][j], color));
    cac = max(cac, dfs(c, vis, temp + 1, i, j - 1, check, c[i][j], color));
  }
  cac = max(cac, dfs(c, vis, temp, i - 1, j, check, c[i][j], color));
  cac = max(cac, dfs(c, vis, temp, i + 1, j, check, c[i][j], color));
  cac = max(cac, dfs(c, vis, temp, i, j + 1, check, c[i][j], color));
  cac = max(cac, dfs(c, vis, temp, i, j - 1, check, c[i][j], color));
  dp[i][j] = max(0LL, cac - temp);
  return cac;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    vector<pair<long long int, long long int> > v;
    for (int i = 0; i < n; i++) {
      long long int x, y;
      cin >> x >> y;
      v.push_back(make_pair(x, y));
    }
    bool ans = true;
    for (long long int i = 1; i < n; i++) {
      if (v[i].first < v[i - 1].first) {
        ans = false;
        break;
      }
      if (v[i].second < v[i - 1].second) {
        ans = false;
        break;
      }
      if (v[i].first - v[i - 1].first < v[i].second - v[i - 1].second) {
        ans = false;
        break;
      }
      if (v[i].first < v[i].second) {
        ans = false;
        break;
      }
    }
    if (v[0].first < v[0].second) ans = false;
    if (ans == true) {
      cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
