from itertools import accumulate





def solve(string):

    n, *ab = list(map(int, string.split()))

    ab = sorted(zip(*[iter(ab)] * 2), key=lambda x: x[1])

    a = [a for a, b in ab]

    b = [b for a, b in ab]

    *a, = accumulate(a)

    return "No" if any([_a > _b for _a, _b in zip(a, b)]) else "Yes"





if __name__ == '__main__':

    n = int(eval(input()))

    print((solve('{}\n'.format(n) + '\n'.join([eval(input()) for _ in range(n)]))))

from operator import itemgetter





def solve(string):

    n, *ab = list(map(int, string.split()))

    ab = sorted(zip(*[iter(ab)] * 2), key=itemgetter(1))

    past = 0

    for a, b in ab:

        past += a

        if past > b:

            return "No"

    return "Yes"





if __name__ == '__main__':

    n = int(eval(input()))

    print((solve('{}\n'.format(n) + '\n'.join([eval(input()) for _ in range(n)]))))

from itertools import accumulate


def solve(string):
    n, *ab = list(map(int, string.split()))
    ab = sorted(zip(*[iter(ab)] * 2), key=lambda x: x[1])
    a = [a for a, b in ab]
    b = [b for a, b in ab]
    (*a,) = accumulate(a)
    return "No" if any([_a > _b for _a, _b in zip(a, b)]) else "Yes"


if __name__ == "__main__":
    n = int(eval(input()))
    print((solve("{}\n".format(n) + "\n".join([eval(input()) for _ in range(n)]))))

from operator import itemgetter


def solve(string):
    n, *ab = list(map(int, string.split()))
    ab = sorted(zip(*[iter(ab)] * 2), key=itemgetter(1))
    past = 0
    for a, b in ab:
        past += a
        if past > b:
            return "No"
    return "Yes"


if __name__ == "__main__":
    n = int(eval(input()))
    print((solve("{}\n".format(n) + "\n".join([eval(input()) for _ in range(n)]))))

-from itertools import accumulate +from operator import itemgetter -    ab = sorted(zip(*[iter(ab)] * 2), key=lambda x: x[1]) -    a = [a for a, b in ab] -    b = [b for a, b in ab] -    (*a,) = accumulate(a) -    return "No" if any([_a > _b for _a, _b in zip(a, b)]) else "Yes" +    ab = sorted(zip(*[iter(ab)] * 2), key=itemgetter(1)) +    past = 0 +    for a, b in ab: +        past += a +        if past > b: +            return "No" +    return "Yes"