program Megalomania
    implicit none
    integer(4):: n,i
    integer(4),allocatable:: a(:), b(:)
    integer(8):: time=0

    read*, n
    allocate(a(n), b(n))

    do i=1,n
        read*, a(i),b(i)
    end do

    call merge_sort(a,b,1,n)

    do i=1,n
        time=time+int(a(i),kind=8)
        if (b(i) < time) then
            print*, 'No'
            stop
        end if
    end do

    print*, 'Yes'


contains
recursive subroutine merge_sort(ar1, ar2, l,r)
    integer(4):: ar1(:), ar2(:), l, r
    integer(4):: tmp, m

    if (r-l <= 1) then
        if (ar2(l) > ar2(r)) then
            tmp = ar2(r)
            ar2(r) = ar2(l)
            ar2(l) = tmp
            tmp = ar1(r)
            ar1(r) = ar1(l)
            ar1(l) = tmp
        end if
        return
    end if

    m = (l+r)/2
    call merge_sort(ar1,ar2,l,m)
    call merge_sort(ar1,ar2,m+1,r)
    call merge_(ar1,ar2,l,m,r)
end subroutine

subroutine merge_(ar1,ar2,l,m,r)
    integer(4):: ar1(:), ar2(:), l,m,r
    integer(4),allocatable:: t1(:), t2(:)
    integer(4):: li, ri, ti
    allocate(t1(r-l+1), t2(r-l+1))
    li=l
    ri=m+1
    ti=1

    do while(li <= m .and. ri <= r)
        if (ar2(li) <= ar2(ri)) then
            t1(ti) = ar1(li)
            t2(ti) = ar2(li)
            li=li+1
        else
            t1(ti) = ar1(ri)
            t2(ti) = ar2(ri)
            ri=ri+1
        end if
        ti=ti+1
    end do

    if (li <= m) then
        t1(ti:) = ar1(li:m)
        t2(ti:) = ar2(li:m)
    else
        t1(ti:) = ar1(ri:r)
        t2(ti:) = ar2(ri:r)
    end if

    ar1(l:r) = t1(:)
    ar2(l:r) = t2(:)
    deallocate(t1,t2)
end subroutine
end program Megalomania