#include <bits/stdc++.h>
using namespace std;
 
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
 
const int MX = 1e6;
 
int n;
ll product = 1;
 
int main() {
	cin.tie(0)->sync_with_stdio(0);
 
	bool pairwise = true;
	cin >> n;
	int gcd;
	rep(i, 0, n) {
		int a; cin >> a;
		if (!i) gcd = a;
		else {
			gcd = __gcd(gcd, a);
			if (__gcd(product, (ll)a) > 1) pairwise = false;
		}
		product *= a;
	}
	
	if (pairwise) cout << "pairwise coprime";
	else if (gcd == 1) cout << "setwise coprime";
	else cout << "not coprime";
}
