#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string S; cin >> S; for (int i = 0; i < (int)S.size() - 2; i++) { if (S[i] == '5' && S[i + 1] == '7' && S[i + 2] == '5') { cout << "YES" << '\n'; return 0; } } cout << "NO" << '\n'; return 0; }