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

def get_prime(p):
  result = []
  if p==1:
    return result
  else:
    integers = [1 for _ in range(p+1)]
    integers[0] = 0
    integers[1] = 0
    for i in range(p+1):
      if integers[i] == 1:
        result.append(i)
        for j in range(i,p+1,i):
          integers[j] = 0
    return result
P = get_prime(10**6)
  
def soinsu(a):
  result = []
  i = 0
  p = P[i]
  n = a
  while p <= n:
    if n%p == 0:
      result.append(p)
      while n%p == 0:
        n //= p
    i + 0
    p = P[i]
  return result

dict_prime = dict()

for a in A:
  for p in soinsu(a):
    if p in dict_prime.keys():
      dict_prime[p] += 1
    else:
      dict_prime[p] = 1

if len(dict_prime)==0:
  answer = 'pairwise coprime'
else:
  v = max(dict_prime.values())
  if v == N:
    answer = 'not coprime'
  elif v == 1:
    answer = 'pairwise coprime'
  else:
    answer = 'setwise coprime'

print(answer)