import sys
from math import sqrt, gcd, ceil, log, floor
from bisect import bisect, bisect_left
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
input = sys.stdin.readline
read = lambda: list(map(int, input().strip().split()))

# MOD = 10**9 + 7

def main():
	n = int(input());arr = read()
	sett = set()
	gcd_ = arr[0]
	flag = 1
	for i in range(n):
		tem  =[]; m = arr[i]
		if flag:
			for fact in range(2, int(sqrt(m)+1)):
				if m % fact == 0:
					if fact in sett:
						flag = 0
						break
					tem.append(fact)
				while m%fact == 0:m //= fact
			if 1 < m < arr[i]:
				if m in sett:
					flag = 0
				tem.append(m)
			# print(tem)
			for k in tem:sett.add(k)
		gcd_ = gcd(gcd_, arr[i])
	if flag:print("pairwise coprime")
	elif gcd_ == 1:print("setwise coprime")
	else:print("not coprime")


if __name__ == "__main__":
	main()
