import math
from functools import reduce
 
n = int(input())
a = list(map(int,input().split()))
 
#累積GCD
left = [0] * (n + 1)
for i in range(n):
    left[i + 1] = (math.gcd(left[i],a[i]))

if left.count(1) == n-1:
  print("pairwise coprime ")
elif left.count(1) > 0:
  print("setwise coprime")
else:
  print("not coprime")