#include<bits/stdc++.h>
#define pb push_back
#define int long long
#define all(x) (x.begin(),x.end())
#define pii pair<int,int> 
#define vi vector<int> 
#define FOR(i,n) for(int i=0;i<n;i++)
#define MOD 1000000007
#define fi first
#define se second
using namespace std;
void solve()
{
	int n;
	cin>>n;
	vector<int> a(n);
	map<int,int> m;
	for(int i=0;i<n;i++)
	{
	cin>>a[i];
	m[a[i]]++;
	}
	int g=a[0];
	for(int i=1;i<n;i++)
	{
		g=__gcd(g,a[i]);
	}
	bool f=0;
	
	bool f1=0; 	
	int ma=0;
	for(int i=0;i<n;i++)
	{
		if(m[a[i]]>1){
			ma=max(ma,a[i]);
		f1=1;}
	}
	if(f1 && ma>1)
	{
		if(g==1)
		cout<<"setwise coprime";
		else
		cout<<"not coprime";
		return;
	}
	map<int,bool> isprime;
	isprime[2]=0;
	for(int i=2;i*i<=1000000;i++)
	{
		if(isprime[i]==0)
		{
			// isprime[i]=1;
			int cnt=0;
			if(m[i]>0)
			cnt++;
			for(int j=2*i;j<=1000000;j+=i)
			{
				isprime[j]=1;
				if(m[j]>0)
				cnt++;
			}
			if(cnt>1){
			f=1;
			break;}
		}
	}
	if(f)
	{
		if(g==1)
		cout<<"setwise coprime";
		else
		cout<<"not coprime";
	}
	else
	cout<<"pairwise coprime";
	
}
int32_t main()
{
	int t=1;
	// cin>>t;
	while(t--)
	{
		solve();
	}
	return 0;
}
// Problem : E - Coprime
// Contest : AtCoder - AtCoder Beginner Contest 177
// URL : https://atcoder.jp/contests/abc177/tasks/abc177_e
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

