#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);
	for(int i = 0; i < n; ++i)
		cin >> v[i];
	sort(v.rbegin(), v.rend());
	int x = v[0];
	bool pair = true;
	for(int i = 1; i < n; ++i){
		x = __gcd(x, v[i]);
		pair &= x == 1;
	}
	if(x == 1){
		if(pair)
			cout << "pairwise coprime" << endl;
		else
			cout << "setwise coprime" << endl;
	}else
		cout << "not coprime" << endl;
	return 0;
}