#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fastt ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define mx 1000989
ll Cnt[mx+10];

bool pf(ll x){
	ll sz=sqrt(x);
	bool flag=false;
	for(ll i=2;i<=sz;i++){
		if(x%i==0){
			Cnt[i]++;
			if(Cnt[i]>1) flag=true; 
			if(x/i!=i){
				Cnt[x/i]++;
				if(Cnt[x/i]>1) flag=true;
			}
		}
	}
	return flag;
}
			
		

int main()
{
	fastt

	ll n;
	cin>>n;
	ll ar[n+10];
	ll gd=0;
	for(ll i=1;i<=n;i++){
		cin>>ar[i];
		gd=__gcd(gd,ar[i]);
	}
	if(gd>1){
		cout<<"not coprime"<<endl;
		return 0;
	}
	else{
		for(ll i=1;i<=n;i++){
			if(pf(ar[i])){
				cout<<"setwise coprime"<<endl;
				return 0;
			}
		}
		cout<<"pairwise coprime"<<endl;
	}

	return 0;
}

