import sys
input = sys.stdin.readline
from collections import defaultdict
from functools import reduce
N = int(input())
A = list(map(int,input().split()))

def gcd(a,b):
    while b:
        a,b = b, a%b
    return a

def primeFactorization(n):
    res = defaultdict(int)
    m = int(n**0.5)
    for i in range(2,m+1):
        while n % i == 0:
            n = n//i
            res[i] += 1
    if n > 1:
        res[n] = 1
    return res

pset = set()
for a in A:
    pf = primeFactorization(a).keys()
    if pset.intersection(pf):
        break
    pset = pset.union(pf)
else:
    print('pairwise coprime')
    exit()

allgcd = reduce(gcd, A)
if allgcd == 1:
    print('setwise coprime')
    exit()

print('not coprime')
