n=int(input())
a=sorted(list(map(int,input().split())))
ma=a[-1]
pn=[i for i in range(ma+1)]
for i in range(2,ma//2+1):
  j=2
  while j*i<=ma:
    pn[j*i]=i
    j+=1
chk=[0]*(ma+1)
for i in a:
  if i==1:
    continue
  x=pn[i]
  chk[x]+=1
  while x!=i:
    while i%x==0:
      i//=x
    x=pn[i]
    chk[x]+=1
ans=2
for i in chk:
  if i==n:
    ans=0
    break
  if i>=2:
    ans=1
if ans==2:
  print('pairwise coprime')
elif ans==1:
  print('setwise coprime')
else:
  print('not coprime')