# coding: utf-8
from math import gcd

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

N=int(input())
A=list(map(int,input().split()))
plime_flg = [True for i in range(10**6)]
pc_flg=True

for i in range(N):
    l=factorization(A[i])
    for j in range(len(l)):
        if plime_flg[l[j][0]]:
            plime_flg[l[j][0]]=False
        else:
            pc_flg=False

x = A[-1]

for i in range(N-1):
    x=gcd(x,A[i])


if pc_flg:
    print("pairwise coprime")
elif x==1:
    print("setwise coprime")
else:
    print("not coprime")


