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

const int MaxN=1e6;
const int MaxA=1e6;
bool guess[1000]={};
vector<int> prime={2,3,5,7,11,13,17,19,23,29,31};

int N, num[MaxN];
int main(){
	/* 1000以內的質數 */
	for(int x:prime)
		for(int i=2;x*i<1000;i++)
			guess[x*i]=1;
	for(int i=37;i<1000;i+=2)
		if(guess[i]==0)
			prime.push_back(i);
	fill(guess,guess+prime.size(),0);

	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++){
		setwise|= (i>0 and num[i]==num[i-1]);
		
		_GCD=__gcd(_GCD,num[i]);
		int tmpv=num[i];
		for(int j=0;j<prime.size();j++)
			if(tmpv%prime[j]==0){
				while(tmpv%prime[j]==0)
					tmpv/=prime[j];
				setwise|= guess[j];
				guess[j]=1;
			}
	}
	if(_GCD==1){
		if(setwise)
			puts("setwise coprime");
		else
			puts("pairwise coprime");
	}else
		puts("not coprime");
}