#include using namespace std; #define lo long long #define sr string #define ch char #define ve vector #define al(x) x.begin(),x.end() #define rep(i,a) for(int i=0;i=b;i--) #define wh while int main(){ sr S; cin>>S; bool f=false; if(S.size()>=3){ rep(i,S.size()-2){ if(S[i]=='5' && S[i+1]=='7' && S[i+2]=='5'){ f=true; break; } } } if(f){ cout<<"YES"<