import sys
import math
from collections import defaultdict


def first_prime_list(N):
    D = [1] * (N + 1)

    for i in range(2, N + 1):
        if D[i] != 1:
            continue
        for j in range(1, N // i + 1):
            if D[i * j] == 1:
                D[i * j] = i

    return D


def factorization_with_fpl(A, D):

    Ps = defaultdict(int)
    current_p = D[A]

    while D[A] > 1:
        cnt = 0
        while D[A] == current_p:
            A = A // D[A]
            cnt += 1

        Ps[current_p] = cnt
        current_p = D[A]

    if A != 1:
        Ps[A] = 1

    return Ps


N = int(sys.stdin.readline().rstrip())
A = [int(x) for x in sys.stdin.readline().rstrip().split()]

D = first_prime_list(max(A))

pc = True
sp = True

maxlist = factorization_with_fpl(A[0], D)

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

for i in range(1, N):
    d = factorization_with_fpl(A[i], D)
    for p in d.keys():
        if min(maxlist[p], d[p]) != 0:
            pc = False
        maxlist[p] = max(maxlist[p], d[p])

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