p[1300],w['~~'],n,s=1,*q;main(i){for(q=p,scanf("%d",&n);i%s++||(ii?w[i]=!~-s,q=p,i++