import math

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

# 累積GCD
left = [0] * (n + 1)
right = [0] * (n + 1)
for i in range(n):
    left[i + 1] = (math.gcd(left[i], a[i]))
    right[n - i - 1] = (math.gcd(right[n - i], a[n - 1 - i]))

ans = 0
for i in range(n):
    ans = max(ans, math.gcd(left[i], right[i + 1]))

if ans == 1:
    print("pairwise coprime")
elif left[n] == 1 and right[0] == 1:
    print("setwise coprime")
else:
    print("not coprime")