def GCD(m, n):
    while n != 0:
        m, n = n, m % n
    return m

def gcd_all(a):
    gcd = a[0]
    for i in range(1, n):
        gcd = GCD(gcd, a[i])
    return gcd

def f(a):
    n = len(a)
    gcd = gcd_all(a)
    if len(set(a)) != n:
        if gcd == 1:
            return 'setwise_coprime'
        else:
            return 'not coprime'
    pairwise_coprime = True
    for i in range(n - 1):
        for j in range(i + 1, n):
            if GCD(a[i], a[j]) != 1:
                pairwise_coprime = False
                break
        if pairwise_coprime == False:
            break
    if pairwise_coprime == False and gcd == 1:
        return 'setwise coprime'
    elif pairwise_coprime:
        return 'pairwise coprime'
    else:
        return 'not coprime'

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