
#include<bits/stdc++.h>
#define st first
#define nd second
#define PQ priority_queue

using ll = long long ;
using namespace std;
using pii = pair<int,int>;
const int N = 1e6 + 5;
const int mod = 0;
vector<int> pr;
int main(){
	pr.reserve(200);
	pr.push_back(2);
	for(int i = 3; i <= 1000; i++){
		bool io = true;
		for(auto it: pr){
			if(it * it > i) break;
			if(i % it == 0){
				io = false;
				break;
			}
		}
		if(io) pr.push_back(i);
	}
	int n, g;
	set<int> ss;
	bool ic = true;
	scanf("%d", &n);
	for(int i = 1; i <= n; i++){
		int x;
		scanf("%d", &x);
		if(i == 1) g = x;
		else if(g != 1) g = __gcd(g, x);
		if(!ic) continue;
		for(auto it: pr){
			if(it * it > x) break;
			if(x % it == 0){
				if(ss.count(it)) {
					ic = false;
					break;
				}
				ss.insert(it);
				while(x % it==0) x /= it;
			}
		}
		if(!ic) continue;
		if(x != 1) ss.insert(x);
	}
	if(g == 1){
		printf(ic ? "pairwise coprime" : "setwise coprime");
	}
	else printf("not coprime");


}