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

int n, a[1001001], sosu[1001001], chk[1001001];

int main(){
	ios_base::sync_with_stdio(0);cin.tie(0);

	for(int i=2;i*i<=1000000;i++){
		if(sosu[i]) continue;
		for(int j=i+i;j*j<=1000000;j+=i) sosu[j] = i;
	}
	
	for(int i=2;i<=1000000;i++) if(!sosu[i]) sosu[i] = i;

	cin >> n;
	for(int i=1;i<=n;i++) cin >> a[i];

	int fl = 0;
	for(int i=1;i<=n && !fl;i++){
		int k = a[i];
		while(k > 1){
			if(chk[sosu[k]] && chk[sosu[k]] != i){
				fl = 1;
				break;
			}
			chk[sosu[k]] = i;
			k /= sosu[k];
		}
	}

	if(!fl){
		cout << "pairwise coprime";
		return 0;
	}

	for(int i=2;i<=n;i++) a[1] = __gcd(a[1], a[i]);

	cout << (a[1] == 1 ? "setwise coprime" : "not coprime");
}