#include <stdio.h> #include<string.h> int main(){ char str[101]; scanf("%s",str); if(strstr(str,"575") == 0 )printf("NO"); else printf("YES"); }