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