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


def resolve():
    import copy
    n = int(input())
    a = list(map(int, input().split()))
    pairwise = True
    union = PrimeFactorization(a[0])
    intersection = copy.deepcopy(union)
    for i in a[1:]:
        p = PrimeFactorization(i)
        if pairwise and p & union:
            pairwise = False
        union = union | p
        intersection = intersection & p
    if intersection:
        print("not coprime")
        return
    if pairwise:
        print("pairwise coprime")
    else:
        print("setwise coprime")


if __name__ == '__main__':
    resolve()
