#include <bits/stdc++.h>

template <class T>
inline void read(T &x) {
	static char ch; 
	static bool opt; 
	while (!isdigit(ch = getchar()) && ch != '-'); 
	x = (opt = ch == '-') ? 0 : ch - '0'; 
	while (isdigit(ch = getchar()))
		x = x * 10 + ch - '0'; 
	if (opt)
		x = ~x + 1; 
}

template <class T>
inline void putint(T x) {
	static char buf[45], *tail = buf; 
	if (!x) {
		putchar('0'); 
	} else {
		if (x < 0)
			putchar('-'), x = ~x + 1; 
		for (; x; x /= 10) *++tail = x % 10 + '0'; 
		for (; tail != buf; --tail) putchar(*tail); 
	}
}

using namespace std; 

const int MaxN = 1e6 + 5; 
const int mod = 1e9 + 7; 

int n; 
int a[MaxN], sum[MaxN]; 

int main() {
	read(n); 

	for (int i = 1; i <= n; ++i) {
		read(a[i]); 
		++sum[a[i]]; 
	}

	int all = a[1]; 
	for (int i = 2; i <= n; ++i) {
		all = std::__gcd(a[i], all); 
	}
	
	if (all != 1) {
		puts("not coprime"); 
	} else {
		int m = 1000000; 

		for (int i = 2; i <= n; ++i) {
			int cur = 0; 
			for (int j = i; j <= m; j += i)
				cur += sum[j]; 
			
			if (cur > 1) {
				puts("setwise coprime"); 
				return 0; 
			}
		}

		puts("pairwise coprime"); 
	}

	return 0; 
}