N=int(input())
ls=[int(s) for s in input().split()]
M=max(ls)
#素数のリスト作成
prime=[1 for i in range(M+1)]
prime[0]=0
prime[1]=0
primels=[]
primedic={}
for i in range(2,M+1):
  if prime[i]==1:
    primels.append(i)
    primedic[i]=0
    a=1
    while a*i<=M:
      prime[a*i]=0
      a+=1

for e in ls:
  for p in primels:
    if e%p==0:
      primedic[p]+=1
      while e%p==0:
        e//=p
    if e==1:
      break
    
A=max(primedic.values())
if A==len(ls):
  print('not coprime')
elif A>1:
  print('setwise coprime')
else:
  print('pairwise coprime')