#include<bits/stdc++.h>
#define ll long long
#define nes ios_base :: sync_with_stdio(0); cin.tie(0);
using namespace std;
int main(){
	nes;
	int n;
	cin>>n;
	vector<int>v(n),res;
	for(int i=0;i<n;++i) cin>>v[i];
	bool x=true;
	for(int i=0;i<n;++i){
		for(int j=i+1;j<n;++j)if(__gcd(v[j],v[i])!=1){
			x=false;
			break;
		}
		if(!x) break;
	}
	if(x) cout<<"pairwise coprime";
	else{
		int p=v[0];
		for(int j=1;j<n;++j) p=__gcd(p,v[j]);
		if(p==1)cout<<"setwise comprime";
		else cout<<"not coprime";
	}
	return 0;
}