def SieveEratosthenes(N):
    PrimeCand = [True if T>=2 else False for T in range(N+1)]
    for I in range(2,N+1):
        if I*I>N:
            break
        if PrimeCand[I]:
            for J in range(2*I,N+1,I):
                PrimeCand[J] = False
    Prime = [I for I in range(1,N+1) if PrimeCand[I]]
    return Prime

N = int(input())
A = [int(T) for T in input().split()]
if len(set(A))!=len(A):
    print('not coprime')
else:
    SeFlag = False
    NoFlag = False
    for SN in SieveEratosthenes(50000):
        Sum = sum(True if TA%SN==0 else False for TA in A)
        if Sum==len(A):
            SeFlag = False
            NoFlag = True
            break
        if Sum>=2:
            SeFlag = True
            NoFlag = False     
    if NoFlag:
        print('not coprime')
    elif SeFlag:
        print('setwise coprime')
    else:
        print('pairwise coprime')