long a,t,i;main(){for(scanf("%ld",&a);a/i/i;i++)t+=a%(i*i)?a%i<1:2;a=!puts(t>4?"YES":"NO");}