program main
  implicit none
  integer(8) i, N, dead, ans, time
  integer(4) x
  integer(8),allocatable :: A(:),B(:)

  read(*, *) N
  allocate(A(N))
  allocate(B(N))

  !B = 10**9+1
  do i = 1,N
    read(*, *) A(i), B(i)
  end do

  dead = 0
  time = 0  
  ans = 0
  do
    dead = minval(B)
    if (dead == 10**9+1) then
      exit
    else
      x = minloc(B,1)
      time = time + A(x)
      B(x) = 10**9+1
      if (time > dead) then
        ans = 1
      end if
    end if
  end do 
  if (ans == 1) then
    write(*, *) 'No'
  else
    write(*, *) 'Yes'
  end if
end program main
