def primeFactors(n):
    ret = set()
    x = 2
    while n > 1:
        while n%x == 0:
            ret.add(x)
            n = n//x
        x += 1
    return ret

N = int(input())
Arr = list(map(int, input().split()))
factors = [primeFactors(x) for x in Arr]
nc = False
for factor in factors[0]:
    this = True
    for f in factors:
        if not factor in f:
            this = False
            break
    if this:
        nc = True
        break

if nc:
    print("not coprime")
else:
    sc = False
    seen = set()
    for factor in factors:
        for f in factor:
            if f in seen:
                sc = True
                break
            else:
                seen.add(f)
        if sc: break
    if sc:
        print("setwise coprime")
    else:
        print("pairwise coprime")
            
        
