import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No00000558_Main { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { if(br.readLine().indexOf("575") > 0) { System.out.println("YES"); } else { System.out.println("NO"); } } }