def GCD(x, y):
    while (y):
        x, y = y, x % y
    return x

def LCM(x, y):
    return x*y//GCD(x,y)

n = int(input())
a = [int(x) for x in input().split()]
g = a[0]
for i in range(1,n):
    if g > a[i]:
        g,a[i] = a[i], g
    g= GCD(a[i], g)

if g > 1:
    print("not coprime")
else:
    prod = 1
    for i in range(0, n):
        prod *= a[i]

    lcm = a[0]
    for i in range(1, n):
        if lcm > a[i]:
            lcm, a[i] = a[i], lcm
        lcm = LCM(a[i], lcm)

    if prod == lcm:
        print("pairwise coprime")
    else:
        print("setwise coprime")


