def gcd(a, b):
    a, b = sorted([a, b], reverse=True)
    if b == 0:
        return a
    else:
        r = a % b
        ans = gcd(b, r)
        return ans

N = int(input())
A = sorted([int(x) for x in input().split()])

pw, sw = False, False
d, l, P = 0, 1, 1
for i in range(N):
    d = gcd(A[i], d)
    P = P * A[i]
    l = (A[i] * l) // gcd(A[i], l)

if d == 1:
    sw = True
    if P == l:
        pw = True

if sw:
    if pw:
        print('pairwise coprime')
    else:
        print('setwise coprime')
else:
    print('not coprime')