import math
n=int(input())
a=list(map(int,input().split()))
mxa=max(a)

def sieve(num):
    input_list = [False if i % 2 == 0 or i % 3 == 0 or i % 5 == 0 else True for i in range(num)]
    input_list[0] = input_list[1] = False
    input_list[2] = input_list[3] = input_list[5] = True
    sqrt = math.sqrt(num)
    for serial in range(3, num, 2):
        if serial >= sqrt:
            return input_list
        for s in range(serial ** 2, num, serial): 
            input_list[s] = False
            
def fact(num):
    arr = []
    temp = num
    for i in range(2, int(-(-num**0.5//1))+1):
        if temp%i==0:
            while temp%i==0:
                temp //= i
            arr.append(i)
    if temp!=1:
        arr.append(temp)
    if arr==[]:
        arr.append(num)
    return arr

flg=True
#prim=sieve(mxa+5)
table=[0]*(mxa+1)
for i in a:
  fc=fact(i)
  for j in fc:
    if table[j]==1:
      flg=False
    table[j]+=1

if flg:
  print("pairwise coprime")
elif n in table:
  print("not coprime")
else:
  print("setwise coprime")

  