def gcd(x, y):
    if y==0:
        return x
    
    return gcd(y, x%y)

n = int(input())
x = [int(w) for w in input().split()]

ans = x[0]
for i in range(1, n):
    ans = gcd(x[i], ans)
    
if ans != 1:
    print('not coprime')
    
else:
    c = 0
    for i in range(n-1):
        for j in range(i+1, n):
            if gcd(x[i], x[j]) != 1:
                c += 1
                break
        if c != 0:
            break
        
    if c != 0:
        print('setwise coprime')
        
    else:
        print('pairwise coprime')