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

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

if gcd!=1:
  print("not coprime")
else:
  check=0
  for i in range(n):
    if nglis[A[i]-1]==1:
      check=1
      break
    else:
      for pi in primelis(A[i]):
        j=1
        while pi*j<=10**6:
          nglis[pi*j-1]=1
          j+=1
  if check==1:
    print("setwise coprime")
  else:
    print("pairwise coprime")

