int gcd(int a,int b);
int main(void)
{
	long N,A1,A2,i=0,gcdans,ngcd,pcF=1;
	scanf("%d",&N);
	scanf("%d",&A1);
	for(i=1;i<N;i++){
		scanf("%d",&A2);
		gcdans=gcd(A1,A2);
		if(i==1) ngcd=gcdans;
		else ngcd=gcd(ngcd,A2);
		if(gcdans!=1) pcF=0;
		A1=A2;
	}
	if(pcF==1){
		printf("pairwise coprime\n");
	}else if(ngcd==1){
		printf("setwise coprime\n");
	}else{
		printf("not coprime\n");
	}
		
	return 0;
}

int gcd(int a,int b)
{
	int a2;
	if(a<b){
		a2=a;
		a=b;
		b=a2;
	}
	while(a%b!=0){
		a2=a;
		a=b;
		b=a2%b;
	}
	return b;
}