import math
X = [0] * 1000000

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

for a in A:
    m = int(math.sqrt(a))
    for i in range(2, m + 1):
        if a % i == 0:
            X[i] += 1
        while a % i == 0:
            a /= i
    a = int(a)
    if a != 1:
        X[a] += 1

ans = 'pairwise coprime'
for x in X:
    if x == N:
        print('not coprime')
        exit()
    if x > 1:
        ans = 'setwise coprime'
print(ans)
