import numpy as np
n=int(input())
a=list(map(int, input().split()))

c=[0]*max(a)
for i in range(n): 
    m=a[i]
    pf={}
    for j in range(2,int(m**0.5)+1):
        while m%j==0:
            pf[j]=pf.get(j,0)+1
            m//=j
    if m>1:pf[m]=1

    for k in pf:
        c[k-1]+=1
        
maxcount=max(c)

if np.gcd.reduce(a) != 1:
    print('not coprime')
elif maxcount <= 1:
    print('pairwise coprime')
else:
    print('setwise coprime')
    