using System; namespace yukicoder { class Program { static void Main(string[] args) { string S = Console.ReadLine(); string str; if(S.Length <= 2) { Console.WriteLine("NO"); } for (int i = 0; i < S.Length - 2; i++) { str = S.Substring(i, 3); if (str == "575") { Console.WriteLine("YES"); break; } else if (i == S.Length - 3) { Console.WriteLine("NO"); } else if (!(str == "575")) { continue; } } } } }