import math 

MOD = 10 ** 9 + 7
n = int(input())
a = list(map(int, input().split()))
d = a[0]
m = a[0]
check = a[0]
def lcm(a,b):
    return a * b // math.gcd(a, b)
for i in range(1, n):
    d = math.gcd(d, a[-i])
    m = lcm(m, a[-i])
    check *= a[-i]
    check %= MOD
    if check != m % MOD:
        m = 0
if d != 1:
    print("not coprime")
elif m == 0:
    print("setwise coprime")
else:
    print("pairwise coprime")
    