import math
n=int(input())
a=list(map(int,input().split()))
ma=max(a)
sa=set(a)
ans=[]
era=[1]*(10**6+1)
era[0]=0

k=2
while k<(10**6+1)**0.5+1:
  if era[k]==1:
    
    for i in range(k,10**6+1,k):
      if i!=k:
        era[i]=0
      if i in sa:
        ans.append(k)
  if k==2:
    k+=1
  else:
    k+=2

pflag=True
if len(ans)!=len(set(ans)):
  pflag=False
if sa!=n:
  pflag=False
  
if pflag == False:
  setwise=a[0]
  for i in range(1,n):
    setwise=math.gcd(setwise,a[i])
  if setwise == 1:
    print("setwise coprime")
  else:
    print("not coprime")
else:
  print('pairwise coprime')