import math
n = int(input())
a = [int(_) for _ in input().split()]
p = [1] * (n + 1)
for i in range(n - 1, -1, -1):
    p[i] = p[i + 1] * a[i]
pc = True
for i in range(n - 1):
    pc = pc & (math.gcd(p[i + 1], a[i]) == 1);
if pc:
    print("pairwise coprime")
    exit(0)
x = 0
for y in a:
    x = math.gcd(x, y)
if x == 1:
    print("setwise coprime")
else:
    print("not coprime")
