import math

n=int(input())
a=list(map(int,input().split()))

dp=[0 for _ in range(1000000+1)]

if n>=150:
  print('pairwise coprime')
  
else:
  ch1=0
  for h in range(n-1):
    g1=a[h]
    for f in range(h+1,n):
      g1=math.gcd(g1,a[f])
    if g1==1:
      ch1+=1
  if ch1==n-1:
    print('pairwise coprime')
    
  else:
    g=a[0]
    for h in range(1,n):
      g=math.gcd(g,a[h])
    
    if g==1:
      print('setwise coprime')
    
    else:
      print('not coprime')
      
     