def PrimeFactorization(n):
    pf = set()
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            yield i
            n //= i
            while n % i == 0:
                n //= i
    if n > 1:
        yield n


def resolve():
    import copy
    n = int(input())
    a = list(map(int, input().split()))
    pairwise = True
    d = {}
    for i in a[:-1]:
        for j in PrimeFactorization(i):
            if pairwise and j in d:
                pairwise = False
            d[j] = d.get(j, 0) + 1
    for j in PrimeFactorization(a[-1]):
        if pairwise and j in d:
            pairwise = False
        if d.get(j, 0) == n - 1:
            print("not coprime")
            return
    if pairwise:
        print("pairwise coprime")
    else:
        print("setwise coprime")


if __name__ == '__main__':
    resolve()
