using System; using System.Linq; public class P0558 { public static void Main() { var s = Console.ReadLine().Trim(); Console.WriteLine(s.IndexOf("575") >= 0 ? "YES" : "NO"); } }