def prime_factors(n, used):
    i = 2
    #factors = []
    fackinds = set()
    while i**2 <= n:
        if n % i != 0:
            i += 1
        else:
            if i not in fackinds:
                used[i] += 1
            fackinds.add(i)
            #factors.append(i)
            n = n // i
    if n > 1:
        if n not in fackinds:
            used[n] += 1
        fackinds.add(n)
        #factors.append(n)
    #return fackinds, factors
    return fackinds

# import math
# def primes(n):
#     max = math.sqrt(n)
#     candidates = [i for i in range(2, n+1)]
#     primes = []
#     while candidates[0] <= max:
#         primes.append(candidates[0])
#         candidates = [candidates[i] for i in range(len(candidates)) if candidates[i] % candidates[0] != 0]
#     primes.extend(candidates)
#     return primes

def primes(n):
    num = [True]*n
    num[0] = num[1] = False
    for i in range(2,int(n**0.5)+1):
        if num[i]:
            for j in range(i**2, n, i):
                num[j] = False
    return [i for i in range(2,n) if num[i]]

def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    prims = primes(10**6)
    used = {}
    for p in prims:
        used[p] = 0

    for a in A:
        fackinds = prime_factors(a, used)
    
    two_over = False
    n_over = False
    for p in prims:
        if used[p] >= 2:
            two_over = True
        if used[p] == N:
            n_over = True
    
    if two_over:
        if n_over:
            print("not coprime")
        else:
            print("setwise coprime")
    else:
        print("pairwise coprime")
    #print(used)

if '__main__' == __name__:
    resolve()

