import math

def main():
    N = int(input())
    As = list(map(int, input().split()))
    
    L = 1000 + 1
    isPrime = [True] * L
    isPrime[0] = isPrime[1] = False
    primes = []
    for n in range(2, L):
        if isPrime[n]:
            primes.append(n)
            isPrime[2*n::n] = [False] * ((L-n-1) // n)

    common_divs = None
    pairwise_flag = True
    for i, a in enumerate(As):
        divs = set()
        for p in primes:
            while a % p == 0:
                divs.add(p)
                a //= p
        if a > 1:
            divs.add(a)
        if i > 0:
            common_divs &= divs
            if common_divs:
                pairwise_flag = False
        else:
            common_divs = divs
    if pairwise_flag:
        print('pairwise coprime')
    elif common_divs:
        print('not coprime')
    else:
        print('setwise coprime')

main()
