from fractions import gcd

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

x = 1
result = []
for i in range(len(arr)):
    y = gcd(arr[i], x)
    result.append(y)
    x = x * arr[i] // y

if result.count(1) == len(arr):
    print("pairwise coprime")
elif result[1:].count(result[1]) == len(arr) - 1:
    print("not coprime")
else:
    print("setwise coprime")