import math

N = int(input())
A = [int(i) for i in input().split()]
a = math.gcd(A[0],A[1])
for i in range(len(A)-2):
  a = math.gcd(a,A[i+2])
if a > 1:
  print("not coprime")
  exit()
l = int(max(A)**(0.5))+1
L = [0]*l
for i in range(2,l):
  if L[i] == 1:
    continue
  for j in range(2,(l+1)//i):
    L[i*j] = 1
pn = []
for i in range(2,l):
  if L[i] == 0:
    pn.append(i)
for p in pn:
  n = 0
  for a in A:
    if a%p == 0:
      n += 1
  if n > 1:
    print("setwise coprime")
    exit()
print("pairwise coprime")