from sys import stdin
input = stdin.readline

def prime_fact2(num):
    ret = set()
    while True:
        if num == 1: break
        tmp = num
        div = 2
        while div * div <= num:
            if num % div == 0:
                ret.add(div)
                ret.add(num//div)
                num //= div
                break
            div += 1
        if num == tmp:
             ret.add(num)
             break
    return ret

def is_prim(n,m):
    ret = []
    N = [False, False] + [True] * (m-1)
    for j in range(m+1):
        if N[j]:
            if n <= j: ret.append(j)
            if j*j<=m:
                k=2
                while k*j <= m:
                    N[k*j]=False
                    k+=1
    return ret

if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
    Primes = is_prim(0, 1000)
    COUNT = [0] * 1000001
    B = [[] for _ in range(N)]
    for i in range(N):
        k = A[i]
        for prime in Primes:
            if k % prime == 0:
                B[i].append(prime)
                COUNT[prime] += 1
                while k > 1 and k % prime == 0:
                    k //= prime
        if k != 1:
            B[i].append(k)
            COUNT[k] += 1

    pairwise = True
    setwise = True
    for i in range(N):
        for prime in B[i]:
            if COUNT[prime] == N:
                setwise = False
            if COUNT[prime] != 1:
                pairwise = False


    if pairwise:
        print("pairwise coprime")
    elif setwise:
        print("setwise coprime")
    else:
        print("not coprime")