M=int(input())
B=list(map(int,input().split()))
import numpy as np
import math
def coprime(A,N):
    X=np.zeros(A[N-1]+1)
    for i in range(int(math.sqrt(A[N-1]))+1):
        if i>=2:
            X[i::i]=1
        sumx=sum(X[A[j]] for j in range(N))
        if sumx==N:
            print('not coprime')
            return
        elif sumx>=2:
            print('setwise coprime')
    print("pairwise coprime")
    return

coprime(B,M)