#include #include using namespace std; int main() { string S; int b = 0,c; cin >> S; c = S.size() - 2; for (int a = 0; a < c; 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; }