import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String S = scan.next(); scan.close(); for(int i = 0; i < S.length() - 2; i++) { String k = S.substring(i, i + 3); if(k.equals("575")) { System.out.println("YES"); System.exit(0); } } System.out.println("NO"); } }