n = int(input())
a = list(map(int, input().split()))
INF = 10 ** 9


def gcd(a, b):
    if a == 0:
        return b
    return gcd(b % a, a)


def is_pairwise_coprime():
    for i in range(n):
        for j in range(i + 1, n):
            if gcd(a[i], a[j]) != 1:
                return False
    return True


def is_setwise_coprime():
    g = a[0]
    for i in range(n - 1):
        g = min(g, gcd(g, a[i + 1]))
    return g == 1


if is_pairwise_coprime():
    print('pairwise coprime')
elif is_setwise_coprime():
    print('setwise coprime')
else:
    print('not coprime')