Scanf.sscanf (read_line ()) "%d %d" (fun n avr -> let line2 = read_line () in let numbers = List.map (fun s -> int_of_string s) (Str.split (Str.regexp " ") line2)(* (String.split_on_char ' ' line2) *) in if (n * avr) = (List.fold_left (+) 0 numbers) then Printf.printf "YES\n" else Printf.printf "NO\n" );;