n = int(input())
A = list(map(int, input().split()))


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

setC = dict()

not_pairwise = False
fs = []
for a in A:
    f = factorization(a)

    vs = set()
    for v, n in f:
        if v in setC:
            not_pairwise = True
        setC.update({v:n})
        vs.add(v)


import math
from functools import reduce
def gcd_multi(numbers):
    return reduce(math.gcd, numbers)

g = gcd_multi(A)

if not not_pairwise:
    print('pairwise coprime')
elif g == 1:
    print('setwise coprime')
else:
    print('not coprime')