#include using namespace std; int main(void) { string s; cin >> s; bool yes = false; for (int i = 0; i < s.size(); i++) { yes |= s.substr(i, 3) == "575"; } cout << (yes ? "YES" : "NO") << endl; return 0; }