//ÃˆÃ“Ã£ Ã‡Ã¡Ã¡Ã¥ Ã¦Ã¡Ã‡ ÃÃ¦Ã¡ Ã¦Ã¡Ã‡ ÃžÃ¦Ã‰ Ã…Ã¡Ã‡ ÃˆÃ‡Ã¡Ã¡Ã¥
#include<bits/stdc++.h>
#define ll long long
#define fir first
#define sec second
#define pb push_back
#define ins insert
#define be begin
#define en end
#define fast ios::sync_with_stdio(0),cin.tie(NULL),cout.tie(NULL)
using namespace std;
const int INF=1e9;
//ll a,b;
ll a[202020],b[202020];
vector<int>adj[200005];
pair<ll,ll>p;
map<string,int>mp;
//map<string,int>::iterator it;
set<ll>st;
set<ll>::iterator it;
string s,t;
ll q,n,m,k,z,x,y,d,sum,ans;
bool prw(){
	for(int i=1;i<n;i++)
		if(__gcd(a[0],a[i])!=1)
			return 0;
	return 1;
}
int main(){
	fast;
	cin>>n;
	ll gcd=0;
	for(int i=0;i<n;i++){
		cin>>a[i];
		gcd=__gcd(gcd,a[i]);
	}
	if(gcd!=1)
		cout<<"not coprime";
	else{
		if(prw())
			cout<<"pairwise coprime";
		else
			cout<<"setwise coprime";	
	}
	
}