# ABC131D - Megalomania

from itertools import accumulate as acc

from operator import itemgetter as gt





def main():

    N = int(eval(input()))

    A = sorted([tuple(map(int, input().split())) for _ in range(N)], key=gt(1))

    T, D = list(zip(*A))  # tasks, deadlines

    # all tasks finish within each deadline?

    flg = all(t <= d for t, d in zip(acc(T), D))

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





if __name__ == "__main__":

    main()
# ABC131D - Megalomania

from itertools import accumulate as acc

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

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

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





if __name__ == "__main__":

    main()
# ABC131D - Megalomania
from itertools import accumulate as acc
from operator import itemgetter as gt


def main():
    N = int(eval(input()))
    A = sorted([tuple(map(int, input().split())) for _ in range(N)], key=gt(1))
    T, D = list(zip(*A))  # tasks, deadlines
    # all tasks finish within each deadline?
    flg = all(t <= d for t, d in zip(acc(T), D))
    print(("Yes" if flg else "No"))


if __name__ == "__main__":
    main()

# ABC131D - Megalomania
from itertools import accumulate as acc
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))))
    flg = all(t <= d for t, d in zip(acc(T), D))  # all tasks finish within a deadline?
    print(("Yes" if flg else "No"))


if __name__ == "__main__":
    main()

-    N = int(eval(input())) -    A = sorted([tuple(map(int, input().split())) for _ in range(N)], key=gt(1)) -    T, D = list(zip(*A))  # tasks, deadlines -    # all tasks finish within each deadline? -    flg = all(t <= d for t, d in zip(acc(T), D)) +    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)))) +    flg = all(t <= d for t, d in zip(acc(T), D))  # all tasks finish within a deadline?