import sys
from collections import Counter
input = sys.stdin.readline

N = int(input())
As = list(map(int,input().split()))

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    return divisors

dvs = []
for i in As:
  dvs+=make_divisors(i)
com = Counter(dvs).most_common()
res=0
for i in com[1:]:
  if i[1] == N:
    res = 2
    break
  elif i[1] >1:
    res = 1
if res == 0:
  print("pairwise coprime")
elif res == 1:
  print("setwise coprime")
else:
  print("not coprime")