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

pairwise_flg = true
setwis_flg = true

for i in range(N-1):
  if gcd(A[i], A[i+1]) != 1:
    pairwise_flg = false
    break

if pairwise_flg == false:
  for i in range(N):
    for j in range(N):
      if i != j:
        if gcd(A[i],A[j]) !=1:
          setwis_flg = false
          break

if pairwise_flg == true:
  print('pairwise coprime')
elif setwis_flg == true:
  print('setwise coprime')
else:
  print('not coprime')


def gcd(a,b):
  if a == b:
    return a
  elif a > b :
    a,b = b, a
  for i range(a,1,-1):
    if a % i ==0 and b % i ==0:
      return i
    else
      return 1