open System let cnt = Console.ReadLine().ToCharArray() |> Array.windowed 3 |> Array.map ((=)[|'5';'7';'5'|]) |> Array.where((=)true) |> Array.length match cnt with | 0 -> "NO" | _ -> "YES" |> printfn "%s"