class Program { static void Main(string[] args) { string str = Console.ReadLine(); if (str.IndexOf("575") == -1) { Console.WriteLine("NO"); } else { Console.WriteLine("YES"); } } }