import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No558 { public static void main(String[] args) { try{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); if(str.indexOf("575") != -1) System.out.println("YES"); else System.out.println("NO"); }catch(IOException e){ e.getStackTrace(); } } }