import math
mod = 10 ** 9 + 7

n = int(input())
a = [int(i) for i in input().split()]
tmp = a[0]
set_v = a[0]
pairwise = True
for i in range(1, n):
    gcd = math.gcd(tmp, a[i])
    set_v = math.gcd(set_v, a[i])
    if gcd  > 1:
        pairwise = False
    tmp = (a[i] * tmp) // gcd
if pairwise == True:
    ans = 'pairwise coprime'
elif set_v == 1:
    ans = 'setwise coprime'
else:
    ans = 'not coprime'
print(ans)