def main():
    N = int(input())
    A = list(map(int, input().split()))
    
    
    def prime_factorize(n):
        r = set()
        while n % 2 == 0:
            r.add(2)
            n //= 2
        f = 3
        while f * f <= n:
            if n % f == 0:
                r.add(f)
                n //= f
            else:
                f += 2
        if n != 1:
            r.add(n)
        return set(r)
    
    
    j = 0
    a1 = set()
    a2 = prime_factorize(A[0])
    for a in A[1:]:
        tmp = prime_factorize(a)
        if a1 & tmp:
            j = 1
        a1 |= tmp
        a2 &= tmp
    if a2:
        print('not coprime')
    elif j:
        print('setwise coprime')
    else:
        print('pairwise coprime')


main()