#include #include #include #include #include using namespace std; #define int long long signed main() { string s; cin >> s; bool f = false; for (int i = 0; i < s.size() - 2;i++) { if (s.substr(i, 3) == "575") { f = true; } } if (f) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }