from operator import itemgetter





def solve(string):

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

    ab = sorted(zip(*[iter(ab[::-1])] * 2))

    past = 0

    for b, a 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)]))))

# ABC131D - Megalomania

from operator import itemgetter as gt





def main():

    N, *AB = list(map(int, open(0).read().split()))

    cur, TD = 0, sorted([(i, j) for i, j in zip(*[iter(AB)] * 2)], key=gt(1))

    for task, deadline in TD:  # check all tasks greedily

        cur += task

        if cur > deadline:  # fail to finish a task within its deadline

            print("No")

            return

    print("Yes")





if __name__ == "__main__":

    main()

from operator import itemgetter


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

# ABC131D - Megalomania
from operator import itemgetter as gt


def main():
    N, *AB = list(map(int, open(0).read().split()))
    cur, TD = 0, sorted([(i, j) for i, j in zip(*[iter(AB)] * 2)], key=gt(1))
    for task, deadline in TD:  # check all tasks greedily
        cur += task
        if cur > deadline:  # fail to finish a task within its deadline
            print("No")
            return
    print("Yes")


if __name__ == "__main__":
    main()

-from operator import itemgetter +# ABC131D - Megalomania +from operator import itemgetter as gt -def solve(string): -    n, *ab = list(map(int, string.split())) -    ab = sorted(zip(*[iter(ab[::-1])] * 2)) -    past = 0 -    for b, a in ab: -        past += a -        if past > b: -            return "No" -    return "Yes" +def main(): +    N, *AB = list(map(int, open(0).read().split())) +    cur, TD = 0, sorted([(i, j) for i, j in zip(*[iter(AB)] * 2)], key=gt(1)) +    for task, deadline in TD:  # check all tasks greedily +        cur += task +        if cur > deadline:  # fail to finish a task within its deadline +            print("No") +            return +    print("Yes") -    n = int(eval(input())) -    print((solve("{}\n".format(n) + "\n".join([eval(input()) for _ in range(n)])))) +    main()