#include #include #include #include #include #include #include #include #include #include using namespace std; #define INIT cin.tie(0); ios::sync_with_stdio(false); #define FOR(i, a, n) for (int i = a; i < n; i++) #define REP(i, n) for(int i = 0; i < n; i++) int main() { INIT; string s; cin >> s; int f = 0; REP(i, s.size() - 2){ if(s[i] == '5' and s[i + 1] == '7' and s[i + 2] == '5'){ f = 1; break; } } if(f == 1) cout << "YES" << endl; else cout << "NO" << endl; return 0; }