#include #include using namespace std; string S; string solve() { for (int i = 0; i < S.length() - 2; i++) if (S.substr(i, 3) == "575") return "YES"; return "NO"; } int main() { string S; cin >> S; cout << solve() << endl; }