from libc.stdio cimport scanf, printf
cdef int n, a, i, j, f, s, M
cdef int[1000001] c
with nogil:
    scanf('%d', &n)
    for i in range(n):
        scanf('%d', &a)
        c[a] += 1
    for i in range(2, 1000001):
        s = 0
        for j in range(i, 1000001, i): s += c[j]
        f |= s > 1
        if s > M: M = s
    if M == n: printf('not coprime')
    elif f: printf('setwise coprime')
    else: printf('pairwise coprime')