import math

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

def func():
    D = [x if x % 2 != 0 else 2 for x in range(Amax+1)]
    for i in range(3, Amax+1, 2):
        if i**2 > Amax:
            break
        elif D[i] != i:
            continue
        else:
            j = i
            while j < Amax:
                if D[j] == j:
                    D[j] = i
                j += i
    return D

GCD = A[0]
for i in range(1, N):
    GCD = math.gcd(GCD, A[i])

if GCD > 1:
    print('not coprime')
else:
    D = func()
    pri = [0] * (Amax+1)
    for i in range(N):
        x, pri_set = A[i], set()
        while x != 1:
            pri_set.add(D[x])
            x //= D[x]
        for y in pri_set:
            if pri[y] > 0:
                print('setwise coprime')
                exit()
            else:
                pri[y] += 1

    print('pairwise coprime')