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

h = 0

for i in range(len(A)):
  if A[i] % 2 != 0:
    h = 1
    
l = 0
for i in range(len(A)):
  if A[i] % 3 != 0:
    l = 1
    
p = 0
for i in range(len(A)):
  if A[i] % 5 != 0:
    p = 1

if h == 0 or l == 0 or p == 0:
  print("not coprime")
  
elif A[0] % 2 != 0:
  print("pairwise coprime")
  
else:
  print("setwise coprime")