let () =
    let main () =
        let n = Scanf.sscanf (read_line ()) "%d" (fun n -> n) in
        let ab = Array.init n (fun _ -> Scanf.sscanf (read_line ()) "%d %d" (fun a b -> b, a)) in
        Array.sort compare ab;
        let a = Array.init n (fun i -> snd ab.(i)) in
        let b = Array.init n (fun i -> fst ab.(i)) in
        let c = Array.make n 0 in
        let rec loop time i =
            if i < n then (
                let time = time + a.(i) in
                c.(i) <- time;
                loop time (i + 1)
            )
        in
        loop 0 0;
        let rec loop i =
            if i = n then "Yes" else if c.(i) > b.(i) then "No" else loop (i + 1)
        in
        print_endline (loop 0)
    in
    main ()