import java.util.Scanner; public class No558 { public static void main(String[] args) { Scanner s = new Scanner(System.in); if (s.next().contains("575")) { System.out.println("YES"); } else { System.out.println("NO"); } } }