N = int(input())
from math import gcd
l = 1
g = 0
B = True
for a in map(int, input().split()):
  if B:
    i = gcd(l, a)
    if i != 1:
      B = False
    else:
      l = l * a // i
  g = gcd(g, a)
if B:
  print('pairwise coprime')
elif g == 1:
  print('setwise coprime')
else:
  print('not coprime')
