#include using namespace std; int main() { string s; cin >> s; bool f = s.find("575") != -1; cout << (f ? "YES" : "NO") << endl; return 0; }