n = int(input())
*a,=map(int, input().split())
mapa=[0]*(10**3+1)

def func(m):
    for i in range(2,int(m**0.5)+2):
        if m%i==0:
            mapa[i]+=1
            while m%i==0:
                m//=i
        else:
            continue
    if m>1:
        mapa[m]+=1

for ai in a:
    func(ai)

tmp=max(mapa)
#print(mapa[:15])
if tmp==n:
    print('not coprime')
elif tmp==1:
    print('pairwise coprime')
else:
    print('setwise coprime')