#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,bool> mp;
    for(i=0;i<n;i++)
    {
    	ll cur = a[i];
    	ll pr = 0;
    	while(cur%2==0)
    	{
    		cur/=2;
			pr = 1;
    	}
    	if(pr==1) 
    	{
    		if(mp.find(2)==mp.end())
    		{
    			mp[2]=1;
    		}
    		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";
		    	return 0;
    		}
    	}
    	for(j=3;j<=cur;j+=2)
    	{
    		ll pr = 0;
    		while(cur%j==0)
    		{
    			cur/=j;
    			pr = 1;
    		}
	    	if(pr==1) 
	    	{
	    		if(mp.find(j)==mp.end())
	    		{
	    			mp[j]=1;
	    		}
	    		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";
			    	return 0;
	    		}
    		}
    	}
    	if(cur!=1)
    	{
    		if(mp.find(cur)==mp.end()) mp[cur] = 1;
    		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";
			    	return 0;	
    		}
    	}
    }
	cout<<"pairwise coprime\n";
}