#include using namespace std; int main() { string S; cin >> S; bool flag = false; for (int i = 0; i < S.length() - 3; ++i) { if (S[i] == '5' && S[i + 1] == '7' && S[i + 2] == '5') { flag = true; break; } } cout << (flag ? "YES" : "NO") << endl; return 0; }