#include using namespace std; int main(){ string n; cin >> n; if(n[0] == '4' or n[0] == '5'){ cout << "YES"; } else{ cout << "NO"; } return 0; }