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