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


int main() {
	
	ios_base::sync_with_stdio(false); 
    cin.tie(NULL); 
    cout.tie(NULL);
	
	map<ll,ll>m;
	
	ll n;
	cin>>n;
	ll a[n];
	for(ll i=0;i<n;i++)
	{
	    cin>>a[i];
	}
	

	ll ans=0;
	for( ll i=0;i<n;i++)
	{
	    ll x=a[i];
	    for(ll j=2;j*j<=x;j++)
	    {
	        
	        if((x%j)==0)
	        {
	            m[j]++;
	            
	        }
	        ll k=x/j;
	        if((x%k)==0)
	        {
	            m[k]++;
	            
	        }
	        if(m[j]>1 || m[k]>1)
	        {
	            ans++;
	            break;
	        }
	       
	    }
	    
	    if(ans==1)
	    {
	        break;
	    }
	    
	}
	
	ll g=a[0];
	for(ll i=0;i<n;i++)
	{
	    g=__gcd(g,a[i]);
	}
	if(g!=1)
	{
	    ans=2;
	}
	if(ans==0)
	{
	    cout<<"pairwise coprime"<<endl;
	}
	else if(ans==1)
	{
	    cout<<"setwise coprime"<<endl;
	}
	else
	{
	    cout<<"not coprime"<<endl;
	}
	
	return 0;
}