a[9];main(){puts(strstr(gets(a),"575")?"YES":"NO");}