from math import gcd

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, cnt])

    if temp!=1:
        arr.append([temp, 1])

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

    return arr

 
N = int(input())
A = list(map(int,input().split()))
 
flg = 0
l = [0]*(10**6+1)
a = gcd(A[0],A[1])
for i in range(2,N):
  a = gcd(a,A[i])
for i in range(N):
  F = factorization(A[i])
  for k,v in F:
    l[k] += 1
    if l[k] > 1:
      flg = 1



if a == 1 and flg == 0:
  print("pairwise coprime ")
elif a == 1 and flg == 1:
  print("setwise coprime")
else:
  print("not coprime")