from math import gcd

N = int(input())
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7

g = A[0]
for i in range(1, N):
	g = gcd(g, A[i])
	
if g != 1:
	print("not coprime")
else:
	g = A[0]
	l = A[0]
	prod = A[0]
	for i in range(1, N):
		g = gcd(g, A[i])
		l = ((l * A[i]) // g) % MOD
		prod = (prod * A[i]) % MOD
		if l != prod:
			print("setwise coprime")
			exit()
	print("pairwise coprime")