#include "bits/stdc++.h" using namespace std; using ll = long long; using IP = pair; #define INF 999999999 #define atcoder(int)1e9+7 #define Endl endl int main() { string s; cin >> s; if (s.length() >= 3) { for (int i = 0; i < s.length() - 2; i++) { if (s[i] == '5' && s[i + 1] == '7' && s[i + 2] == '5') { cout << "YES" << endl; return 0; } } } cout << "NO" << endl; return 0; }