import math
import sys

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

    #pairwise

    A_max=max(A)

    D=[-1 for _ in range(A_max+1)]
    F=[i for i in range(2,A_max+1)]
    bound=math.sqrt(A_max)
    n=F[0]
    while len(F)>0:
        temp=[]
        for f in F:
            if f%n!=0:
                temp.append(f)
            else:
                D[f]=n
        F=temp[:]
        if len(F)>0:
            n=F[0]
    F = [0 for i in range(A_max + 1)]
    flag=0
    for i in range(len(A)):
        n=A[i]
        if F[n]==0:
            F[n]=1
        else:
            flag=1
            break
        while D[n]!=n:
            n=D[n]
            if F[n]==0:
                F[n]=1
            else:
                flag=1
                break
        if flag==1:
            break
    if flag==0:
        print("pairwise coprime")
        sys.exit()
    g=A[0]
    for i in range(len(A)-1):
        g=math.gcd(g,A[i+1])
    if g==1:
        print("setwise coprime")
        sys.exit()
    print("not coprime")
if __name__=="__main__":
    main()