#include using namespace std; int main(){ string S; cin >> S; if(S.find("575") != string::npos) cout << "YES"; else cout << "NO"; cout << endl; return 0; }