#include<bits/stdc++.h>
using namespace std;

const int MaxN=1e6;
const int MaxA=1e6;
bool check[MaxA+1]={};
vector<int> prime={2};

int N, num[MaxN];
int main(){
	/* 1000以內的質數 */
	for(int i=4;i<=MaxA;i+=2)
		check[i]=1;
	for(int i=3;i<1000;i+=2)
		if(check[i]==0){
			prime.push_back(i);
			for(int j=3;i*j<MaxA;j+=2)
				check[i*j]=1;
		}
	
	scanf("%d\n",&N);
	for(int i=0;i<N;i++)
		scanf("%d",&num[i]);
	sort(num,num+N);
	
	bool setwise=false;
	int _GCD=num[0];
	for(int i=0;i<N;i++){
		_GCD=__gcd(_GCD,num[i]);
		for(int j=0;j<prime.size() and prime[j]*prime[j]<=num[i];j++)
			if(num[i]%prime[j]==0){
				while(num[i]%prime[j]==0)
					num[i]/=prime[j];
				setwise|= check[num[i]];
				check[num[i]]=1;
			}
		if(num[i]>1){
			setwise|= check[num[i]];
			check[num[i]]=1;
		}
	}
	if(_GCD==1){
		if(setwise)
			puts("setwise coprime");
		else
			puts("pairwise coprime");
	}else
		puts("not coprime");
}