import math

n = int(input())
a = list(map(int, input().split()))


def is_prime(n):
    if n <= 1:
        return False
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0:
            return False
    return True


def is_pairwise():
    ps = []
    for i in range(1001):
        if is_prime(i):
            ps.append(i)
    cs = [0] * 1010
    for i in a:
        for p in ps:
            if i % p == 0:
                if cs[p] == 1:
                    return False
                cs[p] = 1
    return True


def is_setwise():
    c = a[0]
    for i in a:
        c = math.gcd(c, i)
    return c == 1

a = [i for i in a if i != 1]
if len(a) == 0:
    print('pairwise coprime')
    exit()

if len(a) != len(set(a)) or len(a) > 100000 or not is_pairwise():
    if is_setwise():
        print('setwise coprime')
    else:
        print('not coprime')
else:
    print('pairwise coprime')
