import math

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

t = A[0]
check = A[0]
for i in range(n):
    s = math.gcd(check, A[i])
    t = math.gcd(t, A[i])
    check *= A[i] // t


if t == 1 and s == 1:
    print('pairwise coprime')
elif t == 1:
    print('setwise coprime')
else:
    print('not coprime')
