import math
N = int(input())
A = list(map(int, input().split()))
pairwise_flag = 1
for i in range(N-1):
  for j in range(i+1,N):
    if(math.gcd(A[i],A[j]) == 1):
      continue
    else:
      pairwise_flag = 0
      break
if(pairwise_flag == 1):
  print("pairwise coprime")
else:
  a = A[0]
  for i in range(1,N):
    a = math.gcd(a,A[i])
  if(a==1):
    print("setwise coprime")
  else:
    print("not coprime")