#include using namespace std; #include using namespace atcoder; using ll=long long; using Graph=vector>>; #define MAX 100000 #define MOD 1000000007 #define INF 1000000000000000000 int main(){ int N; cin>>N; vector A(N); for(int i=0;i>A[i]; } int M=1000000; vector grundy(M+1,0); for(int i=2;i*i<=M;i++){ if(grundy[i]==0){ for(int d=i;d<=M;d*=i){ for(int j=d;j<=M;j+=d){ grundy[j]++; } } } } for(int i=1001;i<=M;i++){ if(grundy[i]==0){ for(int j=i;j<=M;j+=i){ grundy[j]++; } } } int x=0; for(int i=0;i