N = int(input())
Alist = list(map(int,input().split()))
    
def GCD(a,b):
    if a>b:
        a = a%b
        if a == 0:
            return(b)
        else:
            return GCD(a,b)
    else:
        b = b%a
        if b == 0:
            return(a)
        else:
            return GCD(a,b)
    
isPC = True
isSC = False
kouyaku = 1
skipindex = 0
    
for i,x in enumerate(Alist):
    for y in Alist[:i]:
        if GCD(x,y) != 1:
            isPC = False
            kouyaku = GCD(x,y)
            break
    else:
        continue
    break
    
if kouyaku > 1:
    for x in Alist:
        kouyaku = GCD(x,kouyaku)
        if kouyaku == 1:
            isSC = True
            break
    
if isPC:
    print('pairwise coprime')
elif isSC:
    print('setwise coprime')
else:
    print('not coprime')