#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=n-2;i>=0;i--)
    {
        suff[i]=__gcd(a[i],suff[i+1]);
       // cout<<suff[i]<<"---"<<a[i]<<" "<<suff[i+1]<<"\n";
       if(suff[i]>1)
       cnt++;
    }
    for(ll i=0;i<n-1;i++)
    {
        ll k=__gcd(a[i],suff[i+1]);
        //cout<<k<<"--"<<a[i]<<" "<<suff[i+1]<<"\n";
        if(k>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;
}