#include <bits/stdc++.h>
using namespace std;
#define ll long long int

vector<ll>v;
ll g;

void sieve(ll n) 
{ 

    bool prime[n+1]; 
    memset(prime, true, sizeof(prime)); 
  
    for (ll p=2; p*p<=n; p++) 
    { 
       
        if (prime[p] == true) 
        { 
             
            for (ll i=p*p; i<=n; i += p) 
                prime[i] = false; 
        } 
    } 
    for (ll p=2; p<=n; p++) 
       if (prime[p]) 
        {
            v.push_back(p);
        }
} 

int main() {
	
	ios_base::sync_with_stdio(false); 
    cin.tie(NULL); 
    cout.tie(NULL);
	
	ll n;
	cin>>n;
	ll a[n];
	for(ll i=0;i<n;i++)
	{
	    cin>>a[i];
	}
	
	
	sieve(1000000);
	ll ans=0;
	for(ll i=0;i<v.size();i++)
	{
	    ll k=0;
	    for(ll j=0;j<n;j++)
	    {
	        if((a[j]%v[i])==0)
	        {
	            k++;
	        }
	    }
	    if(k>1)
	    {
	        ans++;
	        break;
	    }
	}
	
	ll g=a[0];
	for(ll i=0;i<n;i++)
	{
	    g=__gcd(g,a[i]);
	}
	if(g!=1)
	{
	    ans++;
	}
	if(ans==0)
	{
	    cout<<"pairwise coprime"<<endl;
	}
	else if(ans==1)
	{
	    cout<<"setwise coprime"<<endl;
	}
	else
	{
	    cout<<"not coprime"<<endl;
	}
	
	return 0;
}
