#include<bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ull unsigned ll
#define pb push_back
#define mp make_pair
 
using namespace std;

int used[1000001];
int used1[1000001];
vector<int>pr;

void fill_prime(){
	for(ll i=2;i<=1000000;i++){
		for(ll j=i*i;j<=1000000;j+=i)used[j]++;
	}
	for(int i=2;i<=1000000;i++)if(used[i]==0)pr.pb(i);
}

int main(){
	int n;cin>>n;
	int a[n+1];
	int k=0;
	for(int i=1;i<=n;i++)cin>>a[i];
	for(int i=1;i<=n;i++){
		used1[a[i]]++;
		k=__gcd(k,a[i]);
	}
	fill_prime();
	bool ind=false;
	
	for(int i=0;i<pr.size();i++){
		int cnt=0;
		for(int j=pr[i];j<=1000000;j+=pr[i])cnt+=used1[j];
		if(cnt>0){
			ind=true;
			break;
		}
	}
	if(ind==false){
		cout<<"pairwise coprime";
		return 0;
	}
	if(k==1){
		cout<<"setwise coprime";
		return 0;
	}
	cout<<"not coprime";
	return 0;
}
	

	

