#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#include<bits/stdc++.h>
#define fastAF ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define ll long long
#define int ll
#define ull unsigned ll
#define ld long double
#define pb push_back
#define pf push_front
#define dll deque<ll>
#define vll vector<ll>
#define pll pair<ll,ll>
#define mapll map<ll,ll>
#define endl "\n"
#define all(v) v.begin(),v.end()
#define ms(a,x) memset(a,x,sizeof(a))
using namespace std;
void swap(auto*,auto*);
const ll N=1e6; 
    ll sieve[N+1];  ll mainHash[N+1];
 ll hashArr[N+1]; 
int32_t main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    fastAF
    ms(sieve,0);
    for(ll i=1;i<=N;i++) sieve[i]=i;
    for(ll i=2;i*i<=N;i++)
    {
    	if(sieve[i]==i)
    	{
    		for(ll j=i*i;j<=N;j+=i)
    		{
    			if(sieve[j]==j)
    			{
    				sieve[j]=i;
    			}
    		}
    	}
    }
    ll n; cin>>n; ll a[n]; for(ll i=0;i<n;i++) cin>>a[i];
    ll g=a[0];
    for(ll i=1;i<n;i++){
    	g=__gcd(g,a[i]);
    }
    if(g!=1){
    	cout<<"not coprime"; return 0;
    }
   ms(mainHash,0);
    bool flag=0;
    for(ll i=0;i<n;i++)
    {
   		ms(hashArr,0);
   		ll x=a[i];
   		while(sieve[x]!=x)
   		{
   			hashArr[sieve[x]]=1;
   			x/=sieve[x];
   		}
   		if(x!=1) hashArr[x]=1;
   		for(ll j=1;j<=N;j++)
   		{
   			if(hashArr[j]==1&&mainHash[j]) {flag=1; break;}
   			mainHash[j]=max(mainHash[j],hashArr[j]);
   		}
    }
    if(flag) cout<<"setwise coprime"; else cout<<"pairwise coprime";
    return 0;
}
void swap(auto &a,auto &b)
{
    auto temp=a; a=b; b=temp;
}