from functools import reduce
from math import gcd


def primes(n):
    is_prime = [i % 2 != 0 and i % 3 != 0 and i % 5 != 0 and i % 7 != 0 for i in range(n + 1)]
    is_prime[1] = False
    is_prime[2] = is_prime[3] = is_prime[5] = is_prime[7] = True
    for p in range(3, int(n**0.5) + 1, 2):
        if not is_prime[p]:
            continue
        for i in range(p**2, n + 1, p):
            is_prime[i] = False
    return [i for i, p in enumerate(is_prime) if p]


def main():
    n = int(input())
    a = set(int(i) for i in input().split())
    if len(a) < n or reduce(gcd, a) > 1:
        print("not coprime")
        return
    is_prime = [False] * n
    p = primes(max(max(a), 10))
    for i, ai in enumerate(a):
        for pi in p:
            if ai % pi == 0:
                break
        else:
            is_prime[i] = True
    comp = [ai for ai, isp in zip(a, is_prime) if not isp]
    for ci in comp:
        div = set()
        for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
            if ci % i == 0:
                div.add(i)
                div.add(ci // i)
        # print(ci, div, a)
        for d in div:
            if d in a:
                print("setwise coprime")
                return
        a |= div
    print("pairwise coprime")


if __name__ == '__main__':
    main()
