import math
n=int(input())
a=list(map(int,input().split()))
g=a[0]
for m in a:
  g=math.gcd(g,m)
  if g==1:break
else:
  print("not coprime")
  exit()

j=2
l=[0]*2+[1]*(10**6-1)
while j<10*6+1:
  k=1
  if l[j]==1:
    while k*j<10**6:
      l[k*j]==0
      k+=1
  j+=1
d=[]
for i in range(len(l)):
  if l[i]==1: d.append(i)
              
e=set()
for i in range(n):
  z=a[i]
  for m in d:
    if z%m==0:
      if m in e:
        print("setwise coprime")
        exit()
      e.add(m)
print("pairwise coprime")
  
    
