#include <bits/stdc++.h>

using namespace std;
const int N = 2e6;

#define Maxn 1000000	

int n, a[N], vis[N];

int main() {
	scanf("%d", &n);
	for(int i = 1;i <= n; ++i) scanf("%d", &a[i]), vis[a[i]] += 1;
	int A = 1, B = 0;
	for(int j = 2;j <= Maxn; ++j) {
		int num = j, tmp = 0;
		for(int i = num; i <= Maxn; i += num)
			if(vis[i])
				tmp += vis[i];
		if(tmp > 1) B = 1;
		if(tmp == n) A = 0;
	}
	if(A == 0) puts("not coprime");
	else if(B == 1) puts("setwise coprime");
	else puts("pairwise coprime");
	return 0;
}