import math
from functools import reduce

def primes(N): 
  A=list(range(2,N+1))
  p=list()
  while A[0]**2<=N:
      tmp=A[0]
      p.append(tmp)
      A=[e for e in A if e%tmp!=0]
  primes = p+A
  
  return primes

def gcd(*numbers):
    return reduce(math.gcd, numbers)
  
def test(N):
  i=2
  ans=dict()
  n=N
  while i*i <=N:
      while n%i==0:
          n=n//i
          if i in ans:
              ans[i]+=1
          else:
              ans[i]=1
      i+=1
  if n!=1:
      ans[n]=1
  return list(ans.items())

dict = {}
for i in primes(10**6):
  dict[i] = 0
count = 0
n = int(input())
A = list(map(int, input().split()))
if gcd(A) != 1:
  print('not coprime')
else:
  for i in range(n):
    a = test(A[i])
    for j in a:
      dict[j[0]] += 1
    if dict[j[0]] >= 2:
      count = 1
      break
  if count == 1:
    print('setwise coprime')
  else:
    print('pairwise coprime')