N = int(input())
A = list(map(int, input().split()))
B = [0 for i in range(max(A)+1)]
C = [0 for i in range(max(A)+1)]

for i in range(2, len(B)):
  if B[i] != 0:
    continue
  for j in range(i, len(B), i):
    B[j] = i
flag1 = False
flag2 = False

def func(X):
  while X>1:
    x = B[X]
    if C[x]==1:
      flag1 = True
    elif C[x]==N-1:
      flag2 = True
    C[x] += 1
    while X%x==0:
      X = X//x
for a in A:
  func(a)
if flag2:
  print("not coprime")
elif flag1:
  print("setwise coprime")
else:
  print("pairwise coprime")