Scanf.scanf "%d" (fun n ->
    let l = Array.init n (fun _ -> Scanf.scanf " %d" (fun l -> l)) in
    Array.sort compare l;
    let sum = Array.fold_left (+) 0 l - l.(n - 1) in
    print_endline @@ if sum > l.(n - 1) then "Yes" else "No"
)