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