def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

n=int(input())
alist=list(map(int, input().split()))
blist=[0]*100001
for i in alist:
  for j in make_divisors(i):
    blist[j]+=1
cnt=1
for i in range(2,100001):
  cnt=max(cnt,blist[i])
if cnt==1:
  print('pairwise coprime')
else:
  import math
  num=alist[0]
  for i in range(n):
    num=math.gcd(num,alist[i])
  if num==1:
    print('setwise coprime')
  else:
    print('not coprime')