#include using namespace std; typedef int64_t lint; int main() { string s; cin >> s; for (lint i = 0; i < lint(s.size()) - 2; i++) { if (s[i] == '5' && s[i + 1] == '7' && s[i + 2] == '5') { cout << "YES" << endl; // system("pause"); return 0; } } cout << "NO" << endl; // system("pause"); return 0; }