import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

n=int(input())
a=[int(x) for x in input().split()]

if gcd_list(a)==1:
  c=[]
  for i in range(n-1):
    for j in range(i+1,n):
      if math.gcd(a[i],a[j])!=1:
        c.append(False)
        break
  if c==[]:
    print("pairwise coprime")
  else:
    print("setwise coprime")
else:
  print("not coprime")