#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(x) (x).begin(), (x).end()

int main()
{
    ll i,j,n,m;
    cin>>n;
    vector<ll> a(n);
    for(i=0;i<n;i++) cin>>a[i];
    map<ll,set<ll>> mp;
    for(i=0;i<n;i++)
    {
    	ll cur = a[i];
    	while(cur%2==0)
    	{
    		cur/=2;
    		mp[2].insert(i);
    	}
    	for(j=3;j<=cur;j+=2)
    	{
    		while(cur%j==0)
    		{
    			cur/=j;
    			mp[j].insert(i);
    		}
    	}
    	if(cur!=1)
    	{
    		mp[cur].insert(i);
    	}
    }
    ll f = 0;
    for(auto p: mp)
    {
    	if(p.second.size()>1)
    	{
    		f = 1;
    		break;
    	}
    }
    if(f==0) cout<<"pairwise coprime\n";
    else
    {
    	ll gcd = 0;
    	for(i=0;i<n;i++) gcd = __gcd(gcd,a[i]);
    	if(gcd==1) cout<<"setwise coprime\n";
    	else cout<<"not coprime\n";
    }
}