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

def solve(n, a):
    ok = True
    p = a[0]
    for i in range(1, n):
        q = gcd(p, a[i])
        if q > 1:
            ok = False
            break
        p = p * a[i] // q
    if ok:
        return "pairwise coprime"
    p = a[0]
    for i in range(1, n):
       p = gcd(p, a[i])
    return "setwise coprime" if p == 1 else "not coprime"

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