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

#define A33 ios::sync_with_stdio(0);cin.tie(0)
#define endl '\n'
#define pi 3.14159265358979323846
#define ff first
#define ss second

typedef long long ll;

int main(){
	A33;
	int n;
	cin >> n;
	vector<int> v(n);
	const int N = 1e6  + 7;
	vector<bool> div(N);
	for(int i = 0; i < n; ++i){
		cin >> v[i];
		div[v[i]] = true;
	}

	sort(v.begin(), v.end());
	bool pair = true;

	for(int i = 2; i * i <= N; ++i){
		int cnt = 0;
		for(int j = i * i; j <= N; j += i){
			if(div[j]){
				++cnt;
				if(cnt == 2){
					pair = false;
					break;
				}
			}
		}
		if(!pair)
			break;
	}
	int x = v[0];
	for(int i = 1; i < n; ++i){
		x = __gcd(x, v[i]);
	}
	if(x == 1){
		if(pair)
			cout << "pairwise coprime" << endl;
		else
			cout << "setwise coprime" << endl;
	}else
		cout << "not coprime" << endl;
	return 0;
}