import math
def a(n):
    arr = set()
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.add(i)

    if temp!=1:
        arr.add(temp)
    if arr==[]:
        arr.add(n)
    return arr
N=int(input())
L=list(map(int,input().split()))
L=list(set(L))
gc=L[0]
for i in L:
  gc=math.gcd(i,gc)
  if gc==1:
    break
if gc!=1:
  print("not coprime")
  exit()
ans=set()
for i in L:
  if a(i)&ans!=set():
    print("setwise coprime")
    exit()
  ans=a(i)|ans
print("pairwise coprime")