import math

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

    pairwise_flag=0
    setwise_flag=1

    for i in range(N-1):
        g=A[i]
        for j in range(i+1,N):
            g=math.gcd(g,A[j])

        if i==0 and g==1:
            setwise_flag=0

        if g!=1:
            pairwise_flag=1
            break

    if pairwise_flag==0:
        print("pairwise coprime")
    elif setwise_flag==0:
        print("setwise coprime")
    else:
        print("not coprime")

if __name__=="__main__":
    main()