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