import java.util.Scanner; public class Main{ public static void main(String[] args) { Main main=new Main(); main.run(); } void run() { Scanner sc=new Scanner(System.in); String str=sc.next(); if(str.matches(".*575.*")) { System.out.println("YES"); }else { System.out.println("NO"); } } }