/*
    Author : Nishant Gupta 2.0
*/
#include<bits/stdc++.h>
using namespace std;

#define LL long long int
#define getcx getchar_unlocked
#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define MAX 1000005
#define LOG_MAX 20
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define INFL (LL(1e18))
#define chk(a) cerr << endl << #a << " : " << a << endl
#define chk2(a,b) cerr << endl << #a << " : " << a << "\t" << #b << " : " << b << endl
#define chk3(a,b,c) cerr << endl << #a << " : " << a << "\t" << #b << " : " << b << "\t" << #c << " : " << c << endl
#define chk4(a,b,c,d) cerr << endl << #a << " : " << a << "\t" << #b << " : " << b << "\t" << #c << " : " << c << "\t" << #d << " : " << d << endl
#define rep(i, a, n) for(i=a;i<n;i++)
#define rev(i, a, n) for(i=a;i>=n;i--)
#define in(x) scanf("%d", &x)
#define inl(x) scanf("%lld", &x)
#define in2(x, y) scanf("%d %d", &x, &y)
#define inl2(x, y) scanf("%lld %lld", &x, &y)
#define MSV(A,a) memset(A, a, sizeof(A))
#define rep_itr(itr, c) for(itr = (c).begin(); itr != (c).end(); itr++)
#define finish(x) {cout<<x<<'\n'; return;}
typedef pair<int, int> pi;
typedef pair<LL, LL> pl;
const char en = '\n';

int cnt[MAX] = {0};
vector<int> f[MAX];
int np[MAX];
void pre() {
	np[0] = np[1] = 1;
	for(int i=2;i*i<MAX;i++) {
		if(!np[i]) {
			for(int j=2*i;j<MAX;j+=i) {
				np[j] = 1;
			}
		}
	}
	
	for(int i=2;i*i<MAX;i++) {
		if(!np[i]) {
			for(int j=2*i;j<MAX;j+=i) {
				int q = j/i;
				if(q >= i) f[j].PB(i);
				if(q > i && !np[q]) f[j].PB(q); 
			}
		}
	}
}
void solve() {
	int n;in(n);
	int a[n];
	
	int g = 0;
	for(int i=0;i<n;i++) {
		in(a[i]);
		g = __gcd(g, a[i]);
	}
	
	if(g != 1) finish("not coprime");
	
	for(int i=0;i<n;i++) {
		int sz = f[a[i]].size();
		for(int j=0;j<sz;j++) {
			if(cnt[f[a[i]][j]] > 0) finish("setwise coprime");
			cnt[f[a[i]][j]]++;
		}
	}
	finish("pairwise coprime");
}

int main() {
	int t = 1;
	pre();
	//~cin>>t;
	while(t--) {
		solve();
	}
    return 0;
}
