let () = Scanf.scanf "%d\n" @@ fun n ->
  let abs = Array.init n @@ fun _ -> Scanf.scanf "%d %d\n" @@ fun a b -> a, b in
  Array.sort (fun (a, b) (a', b') -> compare (b, a) (b', a')) abs;
  print_endline @@ if
    fst @@
    Array.fold_left (fun (acc, t) (a, b) ->
      acc && t + a <= b, t + a) (true, 0) abs
  then "Yes"
  else "No"