def resolve():
    import math
    def divisor(n):
        ass = []
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                if i != 1:
                    ass.append(i)
                if i ** 2 == n:
                    continue
                ass.append(n // i)
        return ass

    n = int(input())
    a = list(map(int, input().split()))
    a = list(set(a))
    a = sorted(a)
    pair = False
    divisors = set(divisor(a[0]))
    ggcd = a[0]
    for i in range(1, len(a)):
        divs = set(divisor(a[i]))
        nxt = divisors | divs
        if len(nxt) != len(divs) + len(divisors):
            pair = True
            break
        else:
            divisors = nxt
    for i in range(1, len(a)):
        ggcd = math.gcd(ggcd, a[i])
        if ggcd == 1:
            break
    if ggcd != 1:
        print("not coprime")
    else:
        if pair:
            print("setwise coprime")
        else:
            print("pairwise coprime")

resolve()