N = int(input())
A = list(map(int, input().split()))

M = 1000

P = [True for i in range(M+1)]
p_set = set()
for i in range(2,M+1):
  if P[i]:
    p_set.add(i)
    for j in range(2*i, M+1, i):
      P[j] = False
#print( len(p_set) )
#N = 10 ** 6
#A = [1001 for i in range(N)]

c = 0
for p in p_set:
  c_tmp = 0
  for i in range(N):
    if A[i] % p == 0:
      c_tmp += 1
      while A[i] % p == 0:
        A[i] //= p
  c = max(c, c_tmp)

dic = {}
for a in A:
  if a > M:
    if a in dic:
      dic[a] += 1
    else:
      dic[a] = 1
for v in dic.values():
  c = max(c, v)

if c == N:
  print("not coprime")
elif c < 2:
  print("pairwise coprime")
else:
  print("setwise coprime")