#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,l,r) for(ll i=(l);i<(r);++i)

int main(){
	ll n; cin>>n;
	bool flg=false;
	set<ll> st;
	for(ll i=2; i*i<=n; i++){
		if(n%i==0){
			st.insert(n/i); st.insert(i);
		}
	}
	while(!st.empty()){
		ll t=*st.begin(); st.erase(st.begin());
		for(ll i=2; i*i<=t; i++){
			if(n%i==0) flg=true;
		}
		if(flg) break;
	}
	if(n==1) flg=false;
	cout<<(flg?"YES":"NO")<<endl;
}