import functools
import math

n=int(input())
values=list(map(int,input().split()))
#setgcd = functools.reduce(math.gcd, values)
values.sort()

flag=True

sqrtn=int(values[-1]**0.5+1)
prime = {i for i in range(2,sqrtn+1)}
for i in range(2,sqrtn+1):
    if i in prime:
        for j in range(i*2,sqrtn+1,i):
            if j in prime:
                prime.remove(j)

flag=True
flag2=True
for i in prime:
  cnt=0
  for j in values:
    if j%i==0:
      cnt+=1
      if cnt==2:
        flag=False
      if cnt==n:
        flag2=False

if flag:
  print("pairwise coprime")
elif flag2:
  print("setwise coprime")
else:
  print("not coprime")