#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define COUT cout<<fixed<<setprecision(12)
#define fast ios:: sync_with_stdio(false),cin.tie(0);
ll M=1000000007;
void solve()
{
	ll n;
	cin>>n;
	ll a[n+1];
	for(ll i=0;i<n;i++)
	cin>>a[i];
	
	ll suff[n+1];
	suff[n-1]=a[n-1];
	
	ll cnt=0;

    for(ll i=0;i<n;i++)
    {
        for(ll j=i+1;j<n;j++)
        {
            ll h=__gcd(a[i],a[j]);
            if(h>1)
            cnt++;
        }
    }
    if(cnt==0)
    {
        cout<<"pairwise coprime";
    }
    else
    {
        ll d=a[0];
        for(ll i=1;i<n;i++)
        {
            d=__gcd(d,a[i]);
        }
        if(d==1)
        {
            cout<<"setwise coprime";
        }
        else
        {
            cout<<"not coprime";
        }
    }
}

int main()
{
	ll t=1;
	//cin>>t;
	while(t--)
	{
		solve();
	}
	
	return 0;
}