A=list(range(2,10**3+1))
p=list()
while A[0]**2<=10**3+1:
	tmp=A[0]
	p.append(tmp)
	A=[e for e in A if e%tmp!=0]
primes = p+A
N = int(input())
L = list(map(int, input().split()))
R = True
for p in primes:
  c = 0
  for l in L:
    if l%p==0:
      c += 1
      while l%p==0:
        l //= p
  if c==N:
    print("not coprime")
    exit()
  if c>1:
    R = False
L.sort()
if L[0]==L[N-1]:
  print("not coprime")
  exit()
for i in range(N-1):
  if L[i]==L[i+1]:
    R = False
    break
print("pairwise coprime" if R else "setwise coprime")