from math import gcd 
n = int(input())
A = list(map(int,input().split()))
g = A[0]
mul = A[0]
pflag = True
for i in range(n-1):
  if pflag:
    if gcd(mul,A[i+1]) != 1:
      pflag = False 
    mul *= A[i+1]
  g = gcd(g,A[i+1])
if g != 1:
  print("not coprime")
else:
  if pflag:
    print("pairwise coprime")
  else:
    print("setwise coprime")