# ABC131D - Megalomania

def main():

    n = int(eval(input()))

    arr = sorted(

        [tuple(map(int, input().rstrip().split())) for _ in range(n)], key=lambda x: x[1]

    )

    tasks = 0

    for i, j in arr:

        tasks += i

        if tasks > j:

            print("No")

            break

    else:

        print("Yes")





if __name__ == "__main__":

    main()
# ABC131D - Megalomania

import sys

input = sys.stdin.readline



def main():

    n = int(eval(input()))

    arr = sorted(

        [tuple(map(int, input().rstrip().split())) for _ in range(n)], key=lambda x: x[1]

    )

    tasks = 0

    for i, j in arr:

        tasks += i

        if tasks > j:

            print("No")

            break

    else:

        print("Yes")





if __name__ == "__main__":

    main()
# ABC131D - Megalomania
def main():
    n = int(eval(input()))
    arr = sorted(
        [tuple(map(int, input().rstrip().split())) for _ in range(n)],
        key=lambda x: x[1],
    )
    tasks = 0
    for i, j in arr:
        tasks += i
        if tasks > j:
            print("No")
            break
    else:
        print("Yes")


if __name__ == "__main__":
    main()

# ABC131D - Megalomania
import sys

input = sys.stdin.readline


def main():
    n = int(eval(input()))
    arr = sorted(
        [tuple(map(int, input().rstrip().split())) for _ in range(n)],
        key=lambda x: x[1],
    )
    tasks = 0
    for i, j in arr:
        tasks += i
        if tasks > j:
            print("No")
            break
    else:
        print("Yes")


if __name__ == "__main__":
    main()

+import sys + +input = sys.stdin.readline + +