#import sys

#input = sys.stdin.readline

def main():

    N = int( eval(input()))

    T = [ tuple( map( int, input().split())) for _ in range(N)]

    T = sorted(T,key=lambda x:x[1])

    time = 0

    ans = "Yes"

    for i in range(N):

        time += T[i][0]

        if time > T[i][1]:

            ans = "No"

            break

    print(ans)

if __name__ == '__main__':

    main()

import sys

input = sys.stdin.readline

def main():

    N = int( eval(input()))

    T = [ tuple( map( int, input().split())) for _ in range(N)]

    T = sorted(T,key=lambda x:x[1])

    time = 0

    ans = "Yes"

    for i in range(N):

        time += T[i][0]

        if time > T[i][1]:

            ans = "No"

            break

    print(ans)

if __name__ == '__main__':

    main()

# import sys
# input = sys.stdin.readline
def main():
    N = int(eval(input()))
    T = [tuple(map(int, input().split())) for _ in range(N)]
    T = sorted(T, key=lambda x: x[1])
    time = 0
    ans = "Yes"
    for i in range(N):
        time += T[i][0]
        if time > T[i][1]:
            ans = "No"
            break
    print(ans)


if __name__ == "__main__":
    main()

import sys

input = sys.stdin.readline


def main():
    N = int(eval(input()))
    T = [tuple(map(int, input().split())) for _ in range(N)]
    T = sorted(T, key=lambda x: x[1])
    time = 0
    ans = "Yes"
    for i in range(N):
        time += T[i][0]
        if time > T[i][1]:
            ans = "No"
            break
    print(ans)


if __name__ == "__main__":
    main()

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