N = int(input())
A = list(map(int, input().split()))

def GCM(y, x):
  buf = y%x
  if buf==0:
    return x
  else:
    return GCM(x, buf)

A.sort()
maxA = A[-1]
for i in range(2,N+1):
  maxA %= A[-i]
  if maxA == 0:
    maxA = A[-i]
if GCM(A[0], maxA)>1:
  print("not coprime")
else:
  count = 0
  flag=False
  for i in range(N-1):
    for j in range(i+1,N):
      count += 1
      if count > 2000000:
        break
      if GCM(A[-(i+1)],A[-(j+1)]) != 1:
        flag=True
        break
  if flag:
    print("setwise coprime")
  else:
    print("pairwise coprime")
        
    
    
  
