#include #include #include #include #include #define all(x) x.begin(),x.end() #define pb push_back #define ll long long #define P pair #define LP pair using namespace std; int main() { bool f = 0; string s; cin >> s; if (s.size() > 2) { for (int i = 0; i < s.size() - 2; i++) { if (s[i] == '5' and s[i + 1] == '7' and s[i + 2] == '5') { f = 1; } } } if (f) cout << "YES" << endl; else cout << "NO" << endl; return 0; }