def sieve(n):
    is_prime = [True for _ in range(n+1)]
    is_prime[0] = False

    for i in range(2, n+1):
        if is_prime[i-1]:
            j = 2 * i
            while j <= n:
                is_prime[j-1] = False
                j += i
    table = [ i for i in range(1, n+1) if is_prime[i-1]]
    return is_prime, table

n=int(input())
a=sorted(list(map(int,input().split())))
a=list(set(a))
ans=2
if n>len(a):
  ans-=1
pri,prit=sieve(a[-1])
for i in prit:
  cnt=0
  for j in a:
    if i>j:
      continue
    if j%i==0:
      cnt+=1
  if cnt==n:
    ans=0
    break
  if cnt>=2:
    ans=1
if ans==2:
  print('pairwise coprime')
elif ans==1:
  print('setwise coprime')
else:
  print('not coprime')