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+1)
list_count = [0 for _ in range(len(P))]

for a in A:
  for i in range(len(P)):
    p = P[i]
    if a%p == 0:
      list_count[i] += 1
    if a < p:
      break

v = max(list_count)
if v == N:
  answer = 'not coprime'
elif v <= 1:
  answer = 'pairwise coprime'
else:
  answer = 'setwise coprime'

print(answer)