N = int(input())
A = list(map(int, input().split()))
ans = [0, 0]
gcd = [1]
gcda = []
ansp = 0
for i in range(N-1):
    for j in range(i+1, N):
        if A[i] > A[j]:
            a = A[i]
            b = A[j]
        else:
            a = A[j]
            b = A[i]
        c = a % b
        if c == 0:
            gcd.append(b)
            break
        elif c == 1:
            ansp += 1
            break
        for k in range(c):
            a = b
            b = c
            c = a % b
            if c == 0:
                gcd.append(b)
                break
            if c == 1:
                ansp += 1
                break
# print(gcd)            
if ansp == N * (N-1) // 2:
    ans[0] = 1
else:
    gcd.sort()
    if len(gcd) > 1:
        for i in range(1,len(gcd)-1):
            a = gcd[i]
            b = gcd[i+1]
            c = b % a
        if c == 0:
            gcda.append(a)
        elif c == 1:
            pass
        else:   
            for k in range(c):
                b = a
                a = c
                c = b % a
            if c == 1:
                pass
            if c == 0:
                gcda.append(a)
    d = len(gcda)
    if d == 0:
        ans[1] = 1
    else:
        D = gcda[0]
        r = gcda.count(D)
        if r == d:
            pass
        else:
            ans[1] = 1              



if ans[0] == 1:
    print("pairwise comprime")
elif ans[1] == 1:
    print("setwise comprime")
else:
    print("not comprime")        