import functools
import math

N = input()
A = list(map(int, input().split()))
A = sorted(A)
gcd = functools.reduce(math.gcd, A)
if 2 <= gcd:
  print("not coprime")
else:
  isPC = True
  for i, a in enumerate(A):
    for aa in A[i+1:]:
      if 1 != math.gcd(a, aa):
        isPC = False
        break
    if not isPC:
      break
  if isPC:
    print("pairwise coprime")
  else:
    print("setwise coprime")