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

A = sorted(A)

ansN = A[0]
for i in range(1, n):
    ansN = math.gcd(ansN, A[i])
if ansN > 1:
    print('not coprime')
else:
    a0 = A[0]
    ans2 = True
    for a in A[1:]:
        ans2 = ans2 and math.gcd(a0, a) == 1
    if ans2:
        print('pairwise coprime')
    else:
        print('setwise coprime')