package yukicoder; import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class No558 { public static void main(String[] args) { String str = new Scanner(System.in).next(); Pattern p = Pattern.compile(".*575.*"); Matcher m = p.matcher(str); System.out.println(m.find() ? "YES" : "NO"); } }