import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

n = int(input())
a = list(map(int,input().split()))
b = [1] * (n + 1)
for i in range(n, 1, -1):
    b[i - 1] = lcm(b[i], a[i - 1])
flag = 1
for i in range(n - 1):
    if math.gcd(a[i], b[i + 1]) != 1:
        flag = 0
g = a[0]
for i in range(n):
    g = math.gcd(g, a[i])
if flag == 0:
    if g == 1:
        flag = 2
ans = "not coprime"
if flag == 1:
    ans = "pairwise coprime"
elif flag == 2:
    ans = "setwise coprime"
print(ans)