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:
    ans2 = True
    C = [0 for _ in range(10**6+10)]
    for a in A:
        F = factorization(a)
#        print(F)
        for f in F:
            if C[f[0]] == 0:
                C[f[0]] = 1
#                print('!!')
            else:
                ans2 = False
                break
        else:
            continue
        break
    if ans2:
        print('pairwise coprime')
    else:
        print('setwise coprime')