import math
from functools import reduce

def gcd_lis(num_lis):
    return reduce(math.gcd, num_lis)

N = int(input())
lis = list(map(int, input().split()))
c1 = True
c2 = True
for i in range(N-1):
  if math.gcd(lis[i], lis[i+1]) != 1:
    c1 = False

if gcd_lis(lis) != 1:
  c2 = False

if c1:
  print("pairwise coprime")
elif c2:
  print("setwise coprime")
else:
  print("not coprime")