def solve(string):

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

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

    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)]))))

def solve(string):

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

    ab = sorted(zip(*[iter(ab)] * 2), key=lambda x: x[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)]))))

def solve(string):
    n, *ab = list(map(int, string.split()))
    ab = sorted(zip(*[iter(ab)] * 2), key=lambda x: (x[1], x[0]))
    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)]))))

def solve(string):
    n, *ab = list(map(int, string.split()))
    ab = sorted(zip(*[iter(ab)] * 2), key=lambda x: x[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)]))))

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