import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mat = lambda x, y, v: [[v]*y for _ in range(x)]
ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)]
mod = 1000000007
sys.setrecursionlimit(1000000)

from fractions import gcd
from functools import reduce

def gcd(a, b):
	return gcd(b, a%b) if b else a

def get_gcd(A):
	return reduce(gcd, A)

def get_lcm(A):
	def lcm_base(a, b):
		return a*b//gcd(a,b)
	return reduce(lcm_base , A, 1)

N = ri()
A = rl()

h = defaultdict(int)
for a in A:
	h[a] = 1

M = 10**6+5
c = 0
pc = True
for i in range(2, M):
	c = 0
	for j in range(i, M, i):
		c += h[j]
	if c > 1:
		pc = False
		break

if pc:
	print('pairwise coprime')
	exit()

sc = (get_gcd(A) == 1)
if sc:
	print('setwise coprime')
else:
	print('not coprime')
