import sys
input = sys.stdin.readline

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

d = {}
flag = True
flag2 = True

b = list(set(a))
cnt = a.count(1)

if 1 in a:
    if len(a) - len(b) - cnt + 1 != 0:
        flag = False
else:
    if len(a) != len(b):
        flag = False

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

for i in b:
    li2 = factorization(i)
    for x,y in li2:
        if x in d:
            d[x] += 1
        else:
            d[x] = 1

for i,j in d.items():
    if i != 1:
        if j == len(b):
            flag2 = False
        elif j >= 2:
            flag = False

if not flag2:
    print('not coprime')
elif not flag:
    print('setwise coprime')
else:
    print('pairwise coprime')
