#include using namespace std; int main() { string S; cin >> S; cout << ((regex_match(S, regex(".*575|.*575.*|575.*"))) ? "YES" : "NO") << endl; }