import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdlib;

bool solve() {
    auto N = readln.chomp.to!int;
    int pa = 0, pb = 0;

    bool ok = true;

    while (N--) {
        auto s = readln.split.map!(to!int);
        auto a = s[0];
        auto b = s[1];
        if (a < b) ok = false;
        if (a < pa) ok = false;
        if (b < pb) ok = false;
        int da = a - pa;
        int db = b - pb;
        if (db > da) ok = false;
        pa = a;
        pb = b;
    }

    return ok;
}

void main() {
    auto T = readln.chomp.to!int;
    while (T--) writeln(solve ? "YES" : "NO");
}