import math

n = int(input())
a = list(map(int, input().split()))
ans = []
for i in range(n-1):
  for j in range(i+1, n):
    ans.append(math.gcd(a[i], a[j]))
if len(set(ans)) and 1 in set(ans):
  print('pairwise coprime')
  exit()
ans = a[0]
for i in range(1, n):
  ans = math.gcd(ans, a[i])
if ans == 1:
  print('setwise coprime')
else:
  print('not coprime')