from fractions import gcd

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

a = 1
result = []
for x in arr:
    result.append(gcd(a, x))
    a *= x

if result.count(1) == len(arr):
    ans = "pairwise coprime"
elif min(result) == 1:
    ans = "setwise coprime"
else:
    ans = "not coprime"

print(ans)