import math
N = int( input() )
A = sorted( list(map(int, input().split())))
ans = A[0]
L = []
def factorization(n):
    temp = n
    K = []
    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
        if i in L:
          return True
        K.append( i )
    if temp!=1:
      if temp in L:
        return True
      K.append( temp )
    if L=={}:
      L[n] = 1
    L.extend( K )
    return False

for i in range(1, N):
    ans = math.gcd(ans, A[i])
    if ans == 1:
      break
if ans != 1:
  ret = "not coprime"
else:
  ret = "pairwise coprime"
  for a in A:
    if factorization( a ):
      ret = "setwise coprime"
      break
print( ret )