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

def one_coprime(p):
  count = 0
  for a in A:
    if a%p == 0:
      count += 1
  return count <= 1

def none_coprime(p):
  count = 0
  for a in A:
    if a%p != 0:
      return False
  return True

maxA = max(A)
minA = min(A)

answer = 'pairwise coprime'
if maxA > 1:
  for p in get_prime(maxA):
    if one_coprime(p) == False:
      answer = 'setwise coprime'
      break
if answer == 'setwise coprime' and minA > 1:
  for p in get_prime(minA):
    if none_coprime(p) == True:
      answer = 'not coprime'
      break

print(answer)