from math import gcd

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

g = A[0]
l = A[0]
for k in range(N):
  a = A[k]
  g = gcd(g, a)
  if gcd(l, a) == 1:
    print('pairwise coprime')
    exit()
  else:
    l = l*a//gcd(l, a)
if g == 1:
  print('setwise coprime')
else:
  print('not coprime')