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

#define fast ios::sync_with_stdio(false); cin.tie(0);
#define fi first
#define se second
#define em emplace
#define eb emplace_back
#define mp make_pair
#define all(v) (v).begin(), (v).end()

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int inf = 1e9;
const ll INF = 1e18;

int n;
bool chk[1000010];
vector<int> prime;
int cnt[1000010];
int a[1000010];
int d = 0;

int main() {
	fast;

	for(ll i=2; i<=1000; i++) {
		if(chk[i]) continue;

		prime.eb(i);
		
		for(ll j = i * i; j <= 1000; j += i)
			chk[j] = true;
	}

	cin >> n;

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

		for(auto j : prime) {
			if(j * j > a[i]) break;
			if(a[i] % j == 0) {
				cnt[j]++;
				
				while(a[i] % j == 0) a[i] /= j;
			}
		}
	}

	for(auto j : prime) {
		if(cnt[j] > 1) {
			if(d == 1) {
				cout << "setwise coprime";
			}
			else {
				cout << "not coprime";
			}

			return 0;
		}
	}

	cout << "pairwise coprime";
}