/*                                  /   \                                                                   (Hello)//JSM//*/      
/*                                 /*****\                                                                              */
/*     Jai Shree Mataji           /       \ |\| |_| $ |-| K                                                            */
#include<vector>
#include<iostream>
#include<algorithm>                
#include<string.h>                 
#include<bits/stdc++.h>            
#include<cstring>                  
#include<map>                     
#include<cmath>                  
#include<set>
using namespace std;            
#define ll long long int        
#define ld long double
#define MOD 1000000007 
#define PI 3.1415926535897932384626433832795                                               
#define YY cout<<"YES"
#define NN cout<<"NO"
#define Yy cout<<"Yes"
#define Nn cout<<"No"
#define yy cout<<"yes"
#define nn cout<<"no"
#define EE cout<<"\n"
#define ee cout<<"\n"
#define ne cout<<"-1"
#define pb push_back 
#define fi first
#define se second
#define mkp make_pair    
#define mkt make_tuple
#define sall(v ) sort(v.begin(), v.end())      
#define all(v )  v.begin(), v.end()      
#define fo(i , n) for(ll i = 0 ; i < n ; i++)
#define vl vector<ll>
#define vc vector<char> 
#define vll vector< pair<ll,ll> > 
#define mps map<string ,ll>
#define mpc map<char ,ll>
#define mpl map<ll, ll>
#define pr pair<ll,ll>
ll pd(ll x,ll y){if(x%y==0) return x/y;else return x/y+1;}
ll pow1(ll n,ll p){if(p==0)return 1;ll x=pow1(n, p/2);x=(x%MOD*x%MOD)%MOD;if(p%2==0) return x;else return (x*n)%MOD;}
/*vl v[200005];
ll vis[200005];
ll mx=1;
void dfs(ll node,ll d)
{
	if(vis[node]==1)
	return ;
	vis[node]=1;
	d++;
	mx=max(mx,d);
	for(ll i=0;i<v[node].size();i++)
	{
		dfs(v[node][i],d);
	}
}*/
#define MAXN   10000001 
  mpl M;
// stores smallest prime factor for every number 
ll spf[MAXN]; 
ll f=1;  
// Calculating SPF (Smallest Prime Factor) for every 
// number till MAXN. 
// Time Complexity : O(nloglogn) 
void sieve() 
{ 
    spf[1] = 1; 
    for (ll i=2; i<MAXN; i++) 
  
        // marking smallest prime factor for every 
        // number to be itself. 
        spf[i] = i; 
  
    // separately marking spf for every even 
    // number as 2 
    for (ll i=4; i<MAXN; i+=2) 
        spf[i] = 2; 
  
    for (ll i=3; i*i<MAXN; i++) 
    { 
        // checking if i is prime 
        if (spf[i] == i) 
        { 
            // marking SPF for all numbers divisible by i 
            for (ll j=i*i; j<MAXN; j+=i) 
  
                // marking spf[j] if it is not  
                // previously marked 
                if (spf[j]==j) 
                    spf[j] = i; 
        } 
    } 
} 
  
// A O(log n) function returning primefactorization 
// by dividing by smallest prime factor at every step 
void getFactorization(ll x) 
{ 
    vector<ll> ret; 
    while (x != 1) 
    { 
    if(M[spf[x]]==1)
    f=1;
        //ret.push_back(spf[x]); 
        M[spf[x]]=1;
        while(x%spf[x]==0)
        {
        	x = x / spf[x];
		}
		x = x / spf[x]; 
    } 
//    ret
    return ; 
} 
void primeFactors(ll n)  
{  
    // Print the number of 2s that divide n
	  
    if(n%2==0)
    {
    if(M[2]==1)
    f=-1;
	M[2]=1;
	}
	while (n % 2 == 0)
    {  
        n = n/2;  
    }  
  
    // n must be odd at this point. So we can skip  
    // one element (Note i = i +2)  
    for (ll i = 3; i <= sqrt(n); i = i + 2)  
    {  
        // While i divides n, print i and divide n  
        if(n % i==0)
		{
			if(M[n%i]==1)
			f=-1;
			else
			M[n%i]=1;
		}
		while (n % i == 0)  
        {  
            n = n/i;  
        }  
    }  
  
    // This condition is to handle the case when n  
    // is a prime number greater than 2  
    if (n > 2)
	{
		if(M[n]==1)
		f=-1;
		else
		M[n]=1;
	}  
          
} 
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);	
	  ll tt=1;

//	   cin>>tt;
	      while(tt--)
{
/*
3
6 10 15*/
ll n,m,j,k,l,i;
cin>>n;
ll a[n];
fo(i,n)
{
	cin>>a[i];
}
for(i=0;i<n;i++)
{
	primeFactors(a[i]);
}	
ll g=__gcd(a[0],a[1]);
fo(i,n)
{
	g=__gcd(a[i],g);
}
if(f==1&&g==1)
cout<<"pairwise coprime";
else if(g==1)
cout<<"setwise coprime";
else
cout<<"not coprime";
}
return 0;
}

