from math import gcd
from functools import reduce


def calc_ggcd(arr):
    return reduce(gcd, arr)


def decomposition(n):
    i = 2
    is_coprime = True
    while i * i <= n:
        if n % i == 0:
            if appear[i]:
                is_coprime = False
            else:
                appear[i] = True
        i += 1
    return is_coprime


n = int(input())
a = list(map(int, input().split()))
appear = [False] * (max(a) + 1)
keep_pair_coprime = True
for aa in a:
    if not decomposition(aa):
        keep_pair_coprime = False

        # 素因数分解 O(√N)
global_gcd = calc_ggcd(a)
if keep_pair_coprime:
    print('pairwise coprime')
elif global_gcd == 1:
    print('setwise coprime')
else:
    print('not coprime')