from math import gcd
def sieve(n):
    """
    n以下の自然数が素数が否かを判定する。

    Parameters
    ----------
    n: int
        自然数

    Returns
    -------
    f:list
      True:素数
      False:素数以外
    """
    f = []
    is_prime = [True]*(n+1)
    is_prime[0] = False
    is_prime[1] = False

    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]:
            continue
        for j in range(i*2, n+1, i):
            is_prime[j] = False
    for i in range(n+1):
        if is_prime[i]:
            f.append(i)
    return f


n = int(input())
a = list(map(int, input().split()))

f = sieve(10**6)
pairwise_coprime_cnt = 0
pairwise_coprime_cnt_flg = False
even_cnt = 0
evenflg = True
for aa in a:
    if aa in f or aa == 1:
        pairwise_coprime_cnt += 1
    elif aa%2 == 0:
        if even_cnt >= 1:
            evenflg = False
            break
        even_cnt += 1

if evenflg == True:
    pairwise_coprime_cnt += even_cnt


if pairwise_coprime_cnt == n:
    if evenflg == True:
        pairwise_coprime_cnt_flg = True

tmp = a[0]
for i in range(1,n):
    tmp = gcd(tmp,a[i])

if pairwise_coprime_cnt_flg == True:
    print("pairwise coprime")
else:
    if tmp == 1:
        print("setwise coprime")
    else:
        print("not coprime")
