#include <bits/stdc++.h>
#define F(i,a,b) for(ll i=a;i<=(b);++i)
#define dF(i,a,b) for(int i=a;i>=(b);--i)
#define inf 0x3f3f3f3f
#define infll 0x3f3f3f3f3f3f3f3f
#define pb push_back
#define maxnkp make_pair
#define fi first
#define se second
#define eps 1e-7
#define PI acos(-1.0)
using namespace std;
typedef long long ll;
const int mods = 1e9+7;
const int maxn = 1e6+10;
const int N = 1e5+10;
const int E = 1e6+10; 

int n;
ll a[maxn];
ll fac;
ll prime[maxn];	//下标从1开始
bool not_prime[maxn];

int sieve(int n){	//把2到n内所有素数筛选出来
    int p = 0;
    for (int i = 2; i <= n; ++i){
        if(!not_prime[i])
           prime[++p] = i;
        for(int j = 1; j <= p&&i*prime[j]<=n; j++){
        	not_prime[i*prime[j]] = true;	//把比最小素因子的素数的倍数筛除
        	if(i%prime[j]==0) break;	//已找到最小素因子
		}
    }
    return p;   //  返回素数个数
}
 
int main(){
	int len = sieve(1000);
	cin>>n;
	F(i,1,n){
		cin>>a[i];
	}
	ll gg = a[1];
	F(i,2,n){
		gg = __gcd(gg,a[i]);
	}
	if(gg!=1){
		printf("not coprime\n");
		return 0; 
	}
	bool flg = 1;
	F(i,1,len){
		ll u = prime[i];
		int cnt = 0;
		F(j,1,n){
			if(a[j]%prime[i]==0) cnt++;
		}
		if(cnt>1){
			flg = 0;
			break;
		}
	}
	if(flg){
		printf("pairwise coprime\n");
	}
	else {
		printf("setwise coprime\n");
	}
}