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

judge=[0]*(size)

for i in range(len(a)):
    num=a[i]
    if judge[num-1]==-1:
        q=1
    else:
        for j in range(int(num**0.5),1,-1):
            if num%j==0:
                if judge[j-1]==-1:
                    q=1
                    break
                else:
                    judge[j-1]=-1
                if judge[num//j-1]==-1:
                    q=1
                    break
                else:  
                    judge[num//j-1]=-1

    if judge[num-1]<0:
        q=1
    else:
        judge[num-1]=-2

m=min(a)
for i in range(2,int(m**0.5)+1):
    if m%i==0:
        m=i
        break

if q>0:
    for i in range(n):
        if a[i]%m!=0:
            q=2
            break

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

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