#include<iostream>
#include<algorithm>
#include<bits/stdc++.h>
#define ll  long long int
#define mod 1000000007
using namespace std;
	#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<cmath>
#include<bitset>
#include<bits/stdc++.h>

#define ll long long int
#define N 1000005
using namespace std;
ll sieve[N];


void sievealgo()
{
    ll n=N;
    for(ll i=0;i<N;i++)
    	sieve[i]=1;
    sieve[0]=sieve[1]=0;
	sieve[2]=1;	
   for (ll x = 2; x <= N; x++) {
    if (sieve[x]==0) continue;
     for (ll u = 2*x; u <= n; u += x) {
        sieve[u] = 0;
    }
    }
//    for(ll i=1;i<20;i++)
//    	cout<<sieve[i]<<" ";
//    	cout<<endl;
}

main()
{
	//sievealgo();
    for(ll i=0;i<N;i++)
    	sf[i]=0;
		ll n;
		cin>>n;
		
		ll a[n];
		for(ll i=0;i<n;i++)cin>>a[i];
  for(ll u=0;i<n;i+)
  {	
    ll j=2;
    while(a[i])
    {
      while(a[i]%j==0)
      {
        sf[j]++;
        a[i]/=j;
      }
      j++;
    }
      
  }
		ll gcd = a[0];
		for(ll i=0;i<n;i++)
			gcd = __gcd(gcd,a[i]);
  
			ll tt=0,f=1;
			ll nop=0;
			ll p=0;
			
  		
			
  	for(ll i=0;i<N;i++)
    {
     	if(sf[i]>1)
          	f=0;
    }
			
			if(f==1)
			{
				cout<<"pairwise coprime"<<endl;
						
						
			}
			
			if(f!=1)
			{
		if(gcd==1)
		{
			cout<<"setwise coprime"<<endl;
		}		
		else
		{
				cout<<"not coprime"<<endl;
		}
	}
}
