from collections import defaultdict
def enumerate_primes(n):
    if n == 1: return []
    primes = [2] + list(range(3, n + 1, 2))
    i, p = 0, 1
    while p * p <= n:
        if primes[i] != 0:
            p = primes[i]
            primes = [prime if (prime % p != 0 or prime == p) else 0 for prime in primes]
        i += 1
    return [p for p in primes if p != 0]

def main():   
    n = int(input())
    A = list(map(int, input().split()))
    primes = enumerate_primes(int(max(A) ** 0.5) + 1)
    d = defaultdict(int)
    for a in A:
        for p in primes:
            if a % p == 0:
                d[p] += 1
    m = max(d.values())
    if m == n:
        print('not coprime')
    elif m >= 2:
        print('setwise coprime')
    else:
        print('pairwise coprime')

if __name__ == '__main__':
    main()

