#define _GLIBCXX_DEBUG #include using namespace std; int main() { string S; cin >> S; if((int)S.size() >= 3){ int ans = S.find("575"); if(ans != -1) cout << "YES" << endl; else cout << "NO" << endl; }else{ cout << "NO" << endl; } }