import sys
N = int(input())
A = list(map(int,input().split()))
A.sort()
n = A.count(1)
B = [x for x in A if x != 1]
x = 1
for i in range(0,N-n-1):
  for j in range(i+1,N-n):
    for k in range(2,B[i]+1):
      if B[i]%k == 0 and B[j]%k == 0:
        x = 0
if x == 1:
  print("pairwise coprime")
  sys.exit()
y = 1      
for m in range(2,B[0]+1):
  for l in range(0,N-n):
    if B[l]%m != 0:
      y = 0
  if y == 1:
    print("not coprime")
    sys.exit()
    
    
print("setwise coprime")