import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

from math import gcd

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	A = getlist()
	GCD = A[0]
	for i in range(N):
		GCD = gcd(GCD, A[i])

	if GCD != 1:
		print("not coprime")
		return

	B = []
	jud = 0
	for i in A:
		if i != 1:
			B.append(i)
		else:
			jud = 1

	B = list(set(B))
	if jud == 1:
		B.append(1)
	M = len(B)
	if M <= 10 ** 3:
		for i in range(M):
			for j in range(i + 1, M):
				if gcd(B[i], B[j]) != 1:
					print("setwise coprime")
					return
		print("pairwise coprime")
	else:
		print("setwise coprime")

if __name__ == '__main__':
	main()