import sys
import math

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_s = lambda: readline().rstrip().decode('utf-8')
in_nl = lambda: list(map(int, readline().split()))
in_nl2 = lambda H: [in_nl() for _ in range(H)]
in_map = lambda: [s == ord('.') for s in readline() if s != ord('\n')]
in_map2 = lambda H: [in_map() for _ in range(H)]
in_all = lambda: map(int, read().split())


def factorize(n):
    b = 2
    fct = set()
    while b ** 2 <= n:
        while n % b == 0:
            n //= b
            fct.add(b)
        b += 1
    if n > 1:
        fct.add(n)
    return fct


def main():

    N = in_n()
    A = sorted(in_nl())

    M = 10**6 + 1
    ok = [True] * M

    pf = True
    for i in range(N):
        prime = factorize(A[i])
        for p in prime:
            if not ok[p]:
                pf = False
                break
            else:
                ok[p] = False

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

    if pf:
        ans = "pairwise coprime"
    else:
        if g == 1:
            ans = "setwise coprime"
        else:
            ans = "not coprime"

    print(ans)


if __name__ == '__main__':
    main()
