# -*- coding: utf-8 -*-

"""

D - Megalomania

https://atcoder.jp/contests/abc131/tasks/abc131_d



"""

import sys





from heapq import heappop, heappush



def solve(N, tasks):

    ct = 0

    hq = []

    for a, b in tasks:

        heappush(hq, (b, a))



    while hq:

        b, a = heappop(hq)

        ct += a

        if ct > b:

            return 'No'

    return 'Yes'





def main(args):

    N = int(eval(input()))

    tasks = [[int(i) for i in input().split()] for _ in range(N)]

    ans = solve(N, tasks)

    print(ans)





if __name__ == '__main__':

    main(sys.argv[1:])

# -*- coding: utf-8 -*-

"""

D - Megalomania

https://atcoder.jp/contests/abc131/tasks/abc131_d



"""

import sys





def solve(N, tasks):

    ct = 0

    tasks.sort(key=lambda x: x[1], reverse=True)



    while tasks:

        a, b = tasks.pop()

        ct += a

        if ct > b:

            return 'No'

    return 'Yes'





def main(args):

    N = int(eval(input()))

    tasks = [[int(i) for i in input().split()] for _ in range(N)]

    ans = solve(N, tasks)

    print(ans)





if __name__ == '__main__':

    main(sys.argv[1:])

# -*- coding: utf-8 -*-
"""
D - Megalomania
https://atcoder.jp/contests/abc131/tasks/abc131_d
"""
import sys
from heapq import heappop, heappush


def solve(N, tasks):
    ct = 0
    hq = []
    for a, b in tasks:
        heappush(hq, (b, a))
    while hq:
        b, a = heappop(hq)
        ct += a
        if ct > b:
            return "No"
    return "Yes"


def main(args):
    N = int(eval(input()))
    tasks = [[int(i) for i in input().split()] for _ in range(N)]
    ans = solve(N, tasks)
    print(ans)


if __name__ == "__main__":
    main(sys.argv[1:])

# -*- coding: utf-8 -*-
"""
D - Megalomania
https://atcoder.jp/contests/abc131/tasks/abc131_d
"""
import sys


def solve(N, tasks):
    ct = 0
    tasks.sort(key=lambda x: x[1], reverse=True)
    while tasks:
        a, b = tasks.pop()
        ct += a
        if ct > b:
            return "No"
    return "Yes"


def main(args):
    N = int(eval(input()))
    tasks = [[int(i) for i in input().split()] for _ in range(N)]
    ans = solve(N, tasks)
    print(ans)


if __name__ == "__main__":
    main(sys.argv[1:])

-from heapq import heappop, heappush -    hq = [] -    for a, b in tasks: -        heappush(hq, (b, a)) -    while hq: -        b, a = heappop(hq) +    tasks.sort(key=lambda x: x[1], reverse=True) +    while tasks: +        a, b = tasks.pop()