#include #include using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); string x; cin >> x; bool n = false; for(int i = 0; i < x.size()-2 && x.size() != 1; i++){ if(x[i] == '5' && x[i+1] == '7' && x[i+2] == '5'){ n = true; break; } } if(n){ cout << "YES"; }else{ cout << "NO"; } return 0; }