#include using namespace std; int main () { ios::sync_with_stdio(false); int n; string str; cin >> str; if (str.find("575")) { cout << "YES" << "\n"; } else { cout << "NO" << "\n"; } return 0; }