N = int(input())
A = list(map(int, input().split()))
dictA = dict()
for a in A:
  if a in dictA.keys():
    dictA[a] += 1
  else:
    dictA[a] = 1

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 count_coprime(p):
  count = 0
  for a,v in dictA.items():
    if a%p == 0:
      count += v
  return count

maxA = max(A)
answer = 'pairwise coprime'
if maxA > 1:
  if max(dictA.values()) == N:
    answer = 'not coprime'
    break
  if max(dictA.values()) >= 2:
    answer = 'setwise coprime'
  for p in get_prime(1001):
    count = count_coprime(p)
    if count == N:
      answer = 'not coprime'
      break
    elif count >= 2:
      answer = 'setwise coprime'

print(answer)