// E - Coprime
#include <bits/stdc++.h>
using namespace std;
#define rpd(i,s,e,d) for(int i=(s);i<(int)(e);i+=(d))

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

	int mx = 1000000;
	vector<int> D(mx+1, 0);
	rpd(i, 2, mx+1, 1)
		if(!D[i]) rpd(j, i, mx+1, i) D[j] = i;

	int N; cin>>N;
	int g = 0;
	bool not_pairwise = false;
	vector<bool> past(mx+1, false);
	rpd(i, 0, N, 1){
		int a; cin>>a;
		g = gcd(g, a);
		if(not_pairwise) continue;
		vector<bool> now(mx+1, false);
		while(a != 1){
			// 素数 D[a]: 今回は未済 & 過去は済
			if(( not_pairwise = !now[D[a]] && past[D[a]] )) break;
			now[D[a]] = past[D[a]] = true;
			a /= D[a];
		}
	}
	int t = not_pairwise + (g > 1);
	cout<< vector<string>{"pairwise","setwise","not"}[t] <<" coprime\n";
}
