#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
bool visited[100005];
#define pb push_back 


int sz=0;
int lp[10000001];
vector<int> pr;
void prime(int N)
{
				for (int i=2; i<=N; ++i) {
			    if (lp[i] == 0) {
			        lp[i] = i;
			        pr.push_back (i),sz++;
			    }
			    for (int j=0; j<(int)pr.size() && pr[j]<=lp[i] && i*pr[j]<=N; ++j)
			        lp[i * pr[j]] = pr[j];
			}

}



int main()
{



int n;
cin>>n;

ll a[n],M=0;
ll g=0;
ll e=0,t=0,f=0,s=0;
for(auto &x:a)
{
	cin>>x;
	if(x%2==0)e++;
	if(x%3==0)t++;
	if(x%5==0)f++;
	if(x%7==0)s++;
	if(g==0)g=x;
	else
	{
		g=__gcd(g,x);
	}
	
	M=max(M,x);
}

prime(M);

if(g!=1)
{
	cout<<"not coprime";
	return 0;
}


if(e>1||t>1||f>1||s>1)
{
	cout<<"setwise coprime";
	return 0;
}
	for(int i=4;i<sz;i++)
{
	int cnt=0;
	for(int j=0;j<n;j++)
	{
		if(a[j]%pr[i]==0)cnt++;
	}
	
	
	if(cnt>1)
	{
		cout<<"setwise coprime";
		return 0;
	}
	
}



cout<<"pairwise coprime";

}
	


