#include <bits/stdc++.h>

using namespace std;

#define all(x) x.begin(), x.end()
#define sz(x) (int) x.size()
#define pb push_back
#define endl '\n'
#define snd second
#define fst first
#define fastio cin.tie(NULL),cout.sync_with_stdio(true)

typedef long long int ll;
typedef unsigned long long int ull;
typedef vector <int> vi;
typedef pair <int,int> ii;
typedef pair <ii,int> iii;

const int mod = 1e9 + 7;
const ll INF = (1LL<<50);
const int N = 1000005;

int v[N], see[N], cnt[N], p[N];

int main(){
	fastio;
	int n, setwise = 0, pairwise = 1;
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> v[i];
		setwise = __gcd(setwise, v[i]);
		see[v[i]] = 1;
	}
	for(int i = 2; i < N; i++){
		if(!p[i]){
			if(see[i])cnt[i]++;
			for(int j = i+i; j < N; j+=i){
				if(see[j]){
					cnt[i]++;
					if(cnt[i] > 1) pairwise = 0;
				}
				p[j] = 1;
			}
		}
	}
	if(pairwise){
		cout << "pairwise coprime\n";
	} else if(setwise == 1){
		cout << "setwise coprime\n";
	} else cout << "not coprime\n";
	return 0;
}
