def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]
n=int(input())
A=list(map(int,input().split()))
P=primes(10**6)
C={}
for i in range(78498):
  C[P[i]]=i
p=set(P)
B=[0]*(78498)
for i in range(n):
  x=A[i]
  s=A[i]**(1/2)+5
  j=0
  if x in p:
    B[C[x]]+=1
    continue
  while P[j]<s:
    if x in p:
      B[C[x]]+=1
      break
    if x%P[j]==0:
      B[j]+=1
      x=x//P[j]
      while x%P[j]:
        x=x//P[j]
    s=x**(1/2)+5
    j=j+1
f=0
for i in range(78498):
  if B[i]>1:
    f=1
if f==0:
  print("pairwise coprime")
  exit()
for i in range(78498):
  if B[i]>=n:
    f=0
if f==1:
  print("setwise coprime")
else:
  print("not coprime")