# ABC131D - Megalomania

from itertools import accumulate

from operator import itemgetter as gt





def main():

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

    T, D = list(zip(*sorted([(i, j) for i, j in zip(*[iter(AB)] * 2)], key=gt(1))))

    T = list(accumulate(T))

    flg = all(t <= d for t, d in zip(T, D))  # all tasks finish within each deadline?

    print(("Yes" if flg else "No"))





if __name__ == "__main__":

    main()
# 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()
# ABC131D - Megalomania
from itertools import accumulate
from operator import itemgetter as gt


def main():
    N, *AB = list(map(int, open(0).read().split()))
    T, D = list(zip(*sorted([(i, j) for i, j in zip(*[iter(AB)] * 2)], key=gt(1))))
    T = list(accumulate(T))
    flg = all(t <= d for t, d in zip(T, D))  # all tasks finish within each deadline?
    print(("Yes" if flg else "No"))


if __name__ == "__main__":
    main()

# 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 itertools import accumulate -    T, D = list(zip(*sorted([(i, j) for i, j in zip(*[iter(AB)] * 2)], key=gt(1)))) -    T = list(accumulate(T)) -    flg = all(t <= d for t, d in zip(T, D))  # all tasks finish within each deadline? -    print(("Yes" if flg else "No")) +    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")