from math import gcd

# test1 = gcd(40, 20, 1)
# test2 = gcd(60, 40, 1)
# test3 = gcd(50, 3, 1)

# print(test1, test2, test3)

def f(n, ais):
    common_divisor = ais[0]
    for (i, ai) in enumerate(ais):
        common_divisor = gcd(ai, common_divisor)
        for (j, aj) in enumerate(ais[i+1:]):
            if gcd(ai, aj) != 1:
                for aiu in ais[i+1:]:
                    common_divisor = gcd(aiu, common_divisor)
                if common_divisor == 1:
                    return 'setwise coprime'
                else:
                    return 'not coprime'
        # print(common_divisor)
    return 'pairwise coprime'

def make_prime_list():
    l = [2]
    for i in range(3, 100, 2):
        for j in l:
            if i % j == 0:
                break;
        else:
            l.append(i)
    return l;

def find_prime(n, l):
    result = set()
    for p in l:
        if n % p == 0:
            result.add(p)
            while n % p == 0:
                n = n // p
        if p >= n:
            return result
    return result

# l = make_prime_list()
# print(find_prime(60, l))
# print(find_prime(1, l))
# print(find_prime(7, l))

def f(n, ais):
    prime_list = make_prime_list()
    koremadenosoinsuu = set()
    koremadenogcd = ais[0]
    pairwise_coprime = True
    for ai in ais:
        if pairwise_coprime:
            ai_factors = find_prime(ai, prime_list)
            if not ai_factors.isdisjoint(koremadenosoinsuu):
                pairwise_coprime = False
            koremadenosoinsuu = koremadenosoinsuu.union(ai_factors)
        koremadenogcd = gcd(koremadenogcd, ai)
    if pairwise_coprime:
        return 'pairwise coprime'
    elif koremadenogcd == 1:
        return 'setwise coprime'
    else:
        return 'not coprime'

# def test(n, ais, r):
#     result = f(n, ais)
#     print('{} n={}, ais={}, result={}'.format(result == r, n, ais, result))

# r1 = 'pairwise coprime'
# r2 = 'setwise coprime'
# r3 = 'not coprime'

# test(2, [6, 6], r3)
# test(3, [4, 7, 3], r1)
# test(3, [2, 3, 4], r2)
# test(3, [2, 4, 6], r3)

# test(3, [3, 4, 5], r1)
# test(3, [6, 10, 15], r2)
# test(3, [6, 10, 16], r3)

# test(2, [100, 1], r1)
# test(3, [8, 1, 800], r2)
# test(3, [1, 1, 1], r1)
# test(4, [2, 3, 5, 7], r1)
# test(4, [2, 3, 5, 10], r2)

# test(3, [100, 10, 1], r2)

# test(3, [1000000, 777777, 11], r2)

n = int(input())
ais = list(map(int, input().split(' ')))
print(f(n, ais))
