import math

def sieve():
  MAX_INT = 10**6+1
  primes = [True]*(MAX_INT)
  primes[0],primes[1] = False,False

  for i in range(2,int(math.sqrt(MAX_INT)+1)):
    if primes[i] == True:
      # multiple of i
      j = 2
      while i*j < MAX_INT:
        primes[i*j] = False
        j += 1

  return primes

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

odd,even,prime = 0,0,0
for i in range(N):
  if primes[A[i]]:
    prime += 1
  else:
    if A[i]%2==0:
      even += 1
    else:
      odd += 1

if prime == N:
  print("pairwise coprime")
elif even<=1 and odd<=1:
  print("pairwise coprime")
elif prime > 0:
  print("setwise coprime")
else:
  p1 = 2
  while A[0]%p1!=0:
    p1 += 1
  p2 = A[0]//p1

  for i in range(1, N):
    if A[i]%p1==0 or A[i]%p2==0:
      print("not coprime")
      exit()

  print("setwise coprime")