#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL)
typedef long long ll;
typedef long double ld;
#define trace(x)  cerr << #x << ": " << x << endl;
const ll N=1e3+5;ll mod=998244353;
const ll NN=1e6+5; 

ll spf[N];ll ans[NN]={0};

void sieve() 
{ 
    spf[1] = 1; 
    for (ll i=2; i<N; i++) 
        {spf[i] = i;}
    for (ll i=4; i<N; i+=2) 
        spf[i] = 2; 

    for (ll i=3; i<N; i++) 
    { 
        if (spf[i] == i) 
        { 
            for (ll j=i*i; j<N; j+=i) 
                if (spf[j]==j) 
                    spf[j] = i; 
        } 
    }
    //for(ll i=0;i<N;i++)trace(spf[i]);
    return;
} 
int main()
{
	fast;
	ll n;cin>>n;ll g=0;std::vector<ll> a(n);
	for(ll i=0;i<n;i++)
	{
		cin>>a[i];g=__gcd(a[i],g);ans[a[i]]++;
	}
	if(g!=1)
	{
		cout<<"not coprime";return 0;
	}
	set<ll> s;
	for(auto u:a)
	{
		s.insert(u);
	}
	if(s.size()!=n)
	{
		cout<<"setwise coprime";return 0;
	}
	sieve();//cout<<"returned";
	ll f=1;ll k=0;
	for(ll i=2;i<N;i++)
	{
		if(spf[i]!=i)continue;
		k++;
		for(ll j=0;j<n;j++)
		{
			if(a[j]%i==0 && i!=a[j])
			{
				ans[i]++;if(a[j]/i!=i)ans[a[j]/i]++;
			}
		}
	}
	for(ll i=2;i<1e6+5;i++)if(ans[i]>1){f=0;break;}
	//trace(k);
	if(f)cout<<"pairwise coprime";
	else cout<<"setwise coprime";

}