N=int(input())
A=list(map(int, input().split()))
A=sorted(A)
import math
if A==[1]*N:
  print('pairwise coprime')
  exit()
a=A[0]
if A[0]!=1:
  b=max(A)
  D=[0]*(b+1)
  x,y=0,0
  for i in range(N):
    d=math.gcd(a,A[i])
    c=A[i]
    if D[c]==0:
      while c<=b:
        D[c]=1
        c+=A[i]
    else:
      x=1
      #互いに素じゃない二組がある  
    
  if x==1 and d==1:
    print('setwise coprime')
  elif x==0 and d==1:
    print('pairwise coprime')
  else:
    print('not coprime')
else:
  b=max(A)
  a=A[-1]
  D=[0]*(b+1)
  x=0
  for i in range(N):
    if A[i]!=1:
      d=math.gcd(a,A[i])
      c=A[i]
      if D[c]==0:
        while c<=b:
          D[c]=1
          c+=A[i]
      else:
        x=1
        #互いに素じゃない二組がある  
    
  if x==1:
    print('setwise coprime')
  else:
    print('pairwise coprime')