#include #include using namespace std; int main() { string S; int b = 0; cin >> S; for (int a = 0; a < S.size()-2; a++) if (S[a] == '5' && S[a + 1] == '7' && S[a+2] == '5') b = 1; if (b == 1)cout << "YES" << endl; else cout << "NO" << endl; return 0; }