import math

def primelis(n):
    a = []
    if n % 2 == 0:
        a.append(2)
        while n%2==0:
          n=n//2
    f = 3
    while f * f <= n:
      if n%f==0:
        a.append(f)
        while n%f==0:
          n=n//f
    if n != 1:
        a.append(n)
    return a



n=int(input())

A=list(map(int,input().split()))

gcd=A[0]

for i in range(n-1):
  gcd=math.gcd(gcd,A[i+1])

plis=[0 for i in range(10**6)]

if gcd!=1:
  print("not coprime")
else:
  check=0
  for i in range(n):
    for pi in primelis(A[i]):
      if plis[pi-1]!=0:
        check=1
        break
      else:
        plis[pi-1]+=1
    if check==1:
      break
  if check==1:
    print("setwise coprime")
  else:
    print("pairwise coprime")

