def prime_numbers(N):
  A=list(range(2,N+1))
  p=list()
  while A[0]**2<=N:
    tmp=A[0]
    p.append(tmp)
    A=[e for e in A if e%tmp!=0]
  return p+A

n=int(input())
a=sorted(list(map(int,input().split())))
pri,prit=prime_numbers(a[-1])
ans=2
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')