import math
from functools import reduce
n=int(input())
a=list(map(int, input().split()))
q=0
size=10**6
m=max(a)

judge=[0]*m #最小素因数の前計算
judge[0]=1
for i in range(2,m+1):
    for j in range(1,int(i**0.5)+1):
        if j==1:
            continue
        if i%j==0:
            judge[i-1]=j
            break
    if judge[i-1]==0:
        judge[i-1]=i

arr=[0]*m #出た素因数を-1にする
for i in range(len(a)):
    if arr[judge[a[i]-1]-1]<0:
        q=1
    else:
        arr[judge[a[i]-1]-1]=-1

if q>0:
    if reduce(math.gcd,a)!=1:
        q=2

if q==0:
    print('pairwise coprime')

elif q==1:
    print('setwise coprime')
        
else:
    print('not coprime')