while True:

    n = int(eval(input()))

    if n == 0:

        break

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

    cnt = total = 0

    for a, b in z:

        total += a

        if total > b:

            break

        cnt += 1

    print(("Yes" if cnt == n else "No"))
while True:

    n = int(eval(input()))

    if n == 0:

        break

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

    cnt = total = 0

    for a, b in z:

        total += a

        if total > b:

            cnt = 1

            break

    print(("No" if cnt else "Yes"))
while True:
    n = int(eval(input()))
    if n == 0:
        break
    z = sorted([tuple(map(int, input().split())) for _ in range(n)], key=lambda x: x[1])
    cnt = total = 0
    for a, b in z:
        total += a
        if total > b:
            break
        cnt += 1
    print(("Yes" if cnt == n else "No"))

while True:
    n = int(eval(input()))
    if n == 0:
        break
    z = sorted([tuple(map(int, input().split())) for _ in range(n)], key=lambda x: x[1])
    cnt = total = 0
    for a, b in z:
        total += a
        if total > b:
            cnt = 1
            break
    print(("No" if cnt else "Yes"))

+            cnt = 1 -        cnt += 1 -    print(("Yes" if cnt == n else "No")) +    print(("No" if cnt else "Yes"))