from math import gcd
from collections import defaultdict
N = int(input())
A = list(map(int, input().split()))

pc = True
gg = A[0]
so = defaultdict(int)

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

for a in factorization(A[0]):
    so[a] = 1

for i in range(1, N):
    for a in factorization(A[i]):
        if so[a] == 1:
            pc = False
            break
        so[a] = 1
    gg = gcd(A[i], gg)

if pc:
    print("pairwise coprime")
elif gg == 1:
    print("setwise coprime")
else:
    print("not coprime")