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

import math
from functools import reduce
def gcd_list(numbers):
  return reduce(math.gcd, numbers)

tgcd = gcd_list(A)
if tgcd != 1:
  print('not coprime')
  exit()

for i,a in enumerate(A[:-1]):
  for a2 in A[i+1:]:
    if math.gcd(a,a2) != 1:
      print('setwise coprime')
      exit()
print('pairwise coprime')