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

#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define For(i, a) for (int i=0; i<(a); i++)
#define FORR(i,a,b) for (int i = (b)-1; i >= a; i--)
#define Forr(i,a) for (int i = (a)-1; i >= 0; i--)

#define deb(...) cerr << "[" << #__VA_ARGS__ << "] : [", DBG(__VA_ARGS__) 
void DBG() { cerr << "]\n";}
template<typename T, typename ...Args> void DBG(T first, Args... args){
cerr << first; if(sizeof...(args))cerr<<", "; DBG(args...); }

#define int ll
#define pb(x) push_back(x)
#define INF (int)1e17
#define PI 3.14159265358979323846
 
int del_x[4] = {-1, 1, 0, 0};
int del_y[4] = {0, 0, 1, -1};
int XX[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
int YY[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

const int N = 1e6+2;
int prime[N], spf[N], a[N];
bool co=true;

void smallest_prime_factor(){
	memset(spf,-1,sizeof(spf));
    spf[1]=1;
    for(int i=2; i<N; i++){
        if(spf[i]==-1){
            spf[i] = i;
            for(int j = 2; j*i<N; j++){
                if(spf[i*j]==-1){
                    spf[i*j] = i;
                }
            }
        }
    }
}

vector<int> ff(N,0);
void prime_factorize_using_seive(int x){
	vector<int> used(N,0);
    while(x!=1){
			if(!used[spf[x]]){
				ff[spf[x]]++;
				used[spf[x]]=1;
			}
			if(ff[spf[x]]>1)co=false;
			x/=spf[x];
    }
}

void solve(){
	int n; cin >> n;
	For(i,n)cin >> a[i];
	smallest_prime_factor();
	For(i,n){
		prime_factorize_using_seive(a[i]);
	}

	if(co){
		cout << "pairwise coprime\n";
	}
	else{
		vector<int> g(n);
		g[0]=a[0];
		FOR(i,1,n){
			g[i]=gcd(g[i-1],a[i]);
		}
		if(g[n-1]==1){
			cout << "setwise coprime\n";
		}
		else{
			cout << "not coprime\n";
		}
	}
	

}

int32_t main(){ 
	ios_base:: sync_with_stdio(false); 
	cin.tie(0); 
	int t=1;
	for(int tt=1;tt<=t;tt++){
		solve();
	}
}