import math


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    N = read_int()
    A = [a for a in read_ints() if a > 1]
    if len(A) == 0:
        return 'pairwise coprime'
    gcd = A[0]
    for a in A[1:]:
        gcd = math.gcd(gcd, a)
    if gcd > 1:
        return 'not coprime'

    is_prime = [True]*(10**6+1)
    B = [False]*(10**6+1)
    for a in A:
        B[a] = True
    if sum(B) != len(A):
        return 'setwise coprime'

    for p in range(2, 1001):
        if is_prime[p]:
            count = B[p]
            for q in range(2*p, 10**6+1, p):
                is_prime[q] = False
                count += B[q]
            if count > 1:
                return 'setwise coprime'
    return 'pairwise coprime'


if __name__ == '__main__':
    print(solve())
