#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) FOR(i, 0, (n))
#define FOR(i, a, b) for(int i=(a); i<(b); i++)
#define LAR(a, b) ((a)=max((a),(b)))
#define SML(a, b) ((a)=min((a),(b)))
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vl = vector<ll>;
using pii = pair<int, int>;
using vpii = vector<pair<int, int>>;
template<typename T>
using pque = priority_queue<T, vector<T>, greater<T>>;
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define ALL(a) (a).begin(), (a).end()
#ifdef LOCAL_DEBUG
#define DEBUG(...) printf(__VA_ARGS__)
#else
#define DEBUG(...)
#endif

#define N (1<<20)
int c[N] = {};

int main(){
	int n; scanf("%d", &n);
	int g = 0;
	REP(i, n){
		int a; scanf("%d", &a);
		g = gcd(g, a);
		for(int j = 1; j*j <= a; j++){
			if(a%j) continue;
			c[j]++;
			if(j*j < a) c[a/j]++;
		}
	}
	bool ok = true;
	FOR(i, 2, N) if(c[i] > 1) ok = false;
	if(ok) printf("pairwise coprime\n");
	else if(g == 1) printf("setwise coprime\n");
	else printf("not coprime\n");
}
