def is_prime(p):
    d = 2
    while d*d <= p:
        if p % d == 0:
            return False
        d += 1
    return True

N = int(input())
A = list(map(int,input().split()))

primes = []
for i in range(2,1000):
    if is_prime(i):
        primes.append(i)

cnt = [0] * len(primes)
for i in range(len(primes)):
    for a in A:
        if a % primes[i] == 0:
            cnt[i] += 1
    
if N in cnt:
    print("not coprime")
    exit()

for c in cnt:
    if c > 1:
        print("setwise coprime")
        exit()

print("pairwise coprime")
