from math import gcd

def make_prime(n):
    array = set()
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                temp = temp // i
            array.add(i)

    if temp != 1:
        array.add(temp)

    if not array:
        array.add(n)

    return array


N = int(input())
A = list([int(x) for x in input().split()])

result = set()
before = -1
is_pairwise = True
for i in A:
    i_r = make_prime(i)
    if len(result & i_r) > 0:
        is_pairwise = False
    else:
        result |= i_r

    if before == -1:
        before = i
    else:
        before = gcd(i, before)

if is_pairwise:
    print('pairwise coprime')
    exit()

if before == 1:
    print('setwise coprime')
    exit()

print('not coprime')
