def factorization(n):
    if n == 1:
        return {1}
    temp = n
    ans = set()
    SS = [i for i in S if i*2 < n]
    for i in SS:
        if temp % i == 0:
            ans.add(i)
    if temp != 1:
        ans.add(temp)
    return ans

S=set()
L = [True]*(10**6+1)
L[0] = False
L[1] = False
for i in range(2, 10**6+1):
    if L[i]:
        S.add(i)
        for j in range(i*2, 10**6+1, i):
            L[j] = False


def egcd(a, b):
    if a == 0:
        return b
    else:
        g = egcd(b % a, a)
        return g


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

ct = 0
s = set()
for i in range(N):
    tmp = factorization(A[i])-{1}
    ct += len(tmp)
    s |= tmp
    if ct != len(s):
        break
else:
    print('pairwise coprime')
    exit()


L1 = A
while len(L1) > 1:
    l = len(L1)//2
    tmp = [0]*l
    for i in range(l):
        tmp[i] = egcd(L1[2*i], L1[2*i+1])
    if len(L1) % 2 == 1:
        tmp.append(L1[-1])
    L1 = tmp

if L1[0] == 1:
    print('setwise coprime')
else:
    print('not coprime')
