def gcd(a, b):
    if a < b:
        return gcd(b, a)
    while b > 0:
        a, b = b, a % b
    return a

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

checker = [0] * (10 ** 6 + 1)
x = a_list[0]
for a in a_list:
    x = gcd(x, a)
    checker[a] += 1

if all(sum(checker[d::d]) <= 1 for d in range(2, 10 ** 6 + 1)):
    print("pairwise coprime")
elif x == 1:
    print("setwise coprime")
else:
    print("not coprime")
    


