#include <bits/stdc++.h>
using namespace std;
#define all(c) c.begin(),c.end()
#define init(c) memset(c,0,sizeof c)
#define S second
#define F first
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
const int N=20000005;
int n,k,x,t,a,b,m;
string s;
vi v;
 
void solve(){
	scanf("%d",&n);
	int freq[1000005];
	init(freq);
	for(int i =0;i<n;i++){
		scanf("%d",&x);
		v.push_back(x);
		freq[x]++;
	}
	int sq = 1e3+10;
	bool pairwise = true;
	bool vis[1000005];
	init(vis);
	for(int i=2;i<=sq;i++){
		int cnt=0;
		if(vis[i]){
			for(int j=i;j<=1e6;j+=i){
				cnt+=freq[j];
				vis[j]=false;
			}

			if(cnt>1){
				pairwise=false;
				break;
			}
		}
	}
	if(!pairwise){
		int gd = v[0];
		for(int i =1;i<n;i++){
			gd = __gcd(v[i],gd);
		}
		if(gd==1){
			printf("setwise coprime");
		}else{
			printf("not coprime");
		}
	}else{
		printf("pairwise coprime");
	}
 
}
 
int main(){

	t=1;
	while(t--){
		solve();
	}
	
	return 0;
}