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

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 resolve():
    N = int(input())
    A = list(map(int, input().split()))
    used = [0 for i in range(10**5)]
    for a in A:
        fackinds, factors = prime_factors(a, used)
    prims = primes(10**5)
    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()