import math

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

def prime(n):
    p = []
    flag = [True] * (n - 1)
    for i in range(n - 1):
        if flag[i] == True:
            p.append(i + 2)
            num = i
            while num <= n - 2:
                flag[num] = False
                num += i + 2
    return p

p = prime(1000)
flags = [0 for i in range(len(p))]
flag = True
gcd = 0
for i in range(n):
    gcd = math.gcd(gcd, a[i])
if gcd != 1:
    print("not coprime")
else:
    if len(set(a)) != n:
        print("setwise coprime")
    else:
        for i in range(n):
            for j in range(len(p)):
                if a[i] % p[j] == 0:
                    flags[j] += 1
        if max(flags) >= 2:
            print("setwise coprime")
        else:
            print("pairwise coprime")