Scanf.scanf "%s" (fun s -> let rec loop i = if i < 0 then "NO" else if String.sub s i 3 = "575" then "YES" else loop (i - 1) in loop (String.length s - 3) |> print_endline )