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