import math
from functools import reduce

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

            
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
flg2=True
table=[0]*(mxa+1)
for (i,x) in zip(a,range(len(a))):
  fc=fact(i)
  for j in fc:
    table[1]=0
    if table[j]==1:
      flg=False
      break
    table[j]+=1

g=a[0]
for i in a[1:]:
  g=g*i//math.gcd(g,i)
    
if flg:
  print("pairwise coprime")
elif g==1:
  print("setwise coprime")
else:
  print("not coprime")

