import math
import itertools

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

soinsuu = []

def factorization(n):
    arr = []
    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.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr

for i in a:
  soinsuu.append(factorization(i))

soinsuu = list(itertools.chain.from_iterable(soinsuu))
if len(set(soinsuu)) == len(soinsuu):
  ans = "pairwise coprime "
else:
  ans = "setwise coprime"
  gcd = a[n-1]
  for i in range(len(a)-1):
    gcd = math.gcd(a[i],gcd)
  if gcd != 1:
    ans = "not coprime"
  
print(ans)