from math import gcd


def make_prime(n):
    array = {}
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt = cnt + 1
                temp = temp // i
            array[i] = cnt

    if temp != 1:
        array[temp] = 1

    if array == {}:
        array[n] = 1

    return array


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

result = []
before = -1
for i in A:
    result.extend(list(make_prime(i).keys()))
    if before == -1:
        before = i
    else:
        before = gcd(i, before)

if len(set(result)) == len(result):
    print('pairwise coprime')
    exit()

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

print('not coprime')
