#E

import math

INF=float('inf')
ans1='pairwise coprime'
ans2='setwise coprime'
ans3='not coprime'

n=int(input())
A=list(map(int,input().split()))

g=math.gcd(A[0],A[1])
for i in range(2,n):
  g=math.gcd(g,A[i])

if g!=1:
  print(ans3)
else:
  for i in range(n):
    for j in range(n):
      if i==j:
        continue
      if math.gcd(A[i],A[j])!=1:
        print(ans2)
        exit()
  print(ans1)