N = int(input())
a = list(map(int, input().split()))
import math
ans = a[0]
for i in range(1, N):
    ans = math.gcd(ans, a[i])
anst = a[0]
for i in range(1, N):
    anst = anst * a[i] // math.gcd(anst, a[i])
y = 1
for i in range(N):
  y = y * a[i]
if ans != 1:
  print('not coprime')
else:
  if y == anst:
    print('pairwise comprime')
  else:
    print('setwise comprime')
  