from math import sqrt
from math import gcd

def Eratos(n):
    F = [True for _ in range(n+1)]
    F[0],F[1] = False,False
    for i in range(2,int(sqrt(n))+1):
        if F[i]:
            for j in range(2,n//i+1):
                F[i*j] = False

    P = []
    for i in range(2,n+1):
        if F[i]:
            P.append(i)
    return P

def fact(n):#return P={p | pはnの素因数}
    P = Eratos(n)
    ret = set()
    for i in range(len(P)):
        if n % P[i] == 0:
            ret.add(P[i])
        if P[i] > n:
            break
    return ret

def GCD(A,N):
    g = A[0]
    for i in range(N):
        g = gcd(g,A[i])
        if g == 1:
            return 1
    return g

def solve(A,N):
    ans = ["pairwise coprime","setwise coprime","not coprime"]
    ans_id = 0
    P = set()
    pc_flag = True
    for i in range(N):
        P_tmp = fact(A[i])
        if len(P & P_tmp) == 0:
            P = P.union(P_tmp)
        else:
            ans_id += 1
            pc_flag = False
            break

    if pc_flag:
        return ans[ans_id]
    else:
        if GCD(A,N) == 1:
            return ans[ans_id]
        else:
            ans_id += 1
            return ans[ans_id]

def main():
    N = int(input())
    A = list(map(int,input().split()))

    print(solve(A,N))

if __name__ == "__main__":
    main()
