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