#include <bits/stdc++.h>
#include <list>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
int n, a, p, ag;
bool nps[1000005], pw = true;
list<int> pl;
int main(){
	for(int i=2; i<=1000000; i++) if(!nps[i]){
		if(i<=1000) pl.push_back(i);
		for(int j=i*2; j<=1000000; j+=i) nps[j] = true; 
	}
	scanf("%d", &n);
	rep(i,n){
		scanf("%d", &a);
		ag = i ? gcd(ag,a) : a;
		for(auto it = pl.begin(); it != pl.end(); ){
			int t = *it;
			if(a % t == 0){
				while(a % t == 0) a /= t;
				nps[t] = true;
				it = pl.erase(it);
			}else ++it;
		}
		if(nps[a]) pw = false;
	}
	printf("%s coprime\n", pw ? "pairwise" : ag == 1 ? "setwise" : "not");
}