ll@N,k,r,f[9],e[9],b[N+1]={};REP(i,N){k=1;REP(m,Factor(i+1,f,e))if(e[m]%2)k*=f[m];RREP(j,1,N/k+1)if(!b[k*j]&&j==r*(r=sqrt(j))){b[k*j]=1;wtSp(k*j);break;}}