def gcd(a, b):
    return gcd(b, a % b) if b > 0 else a


def judge_pairwise(array, n):
    array.sort()
    isOK = [True] * (n + 1)
    isOK[0] = False
    isOK[1] = True
    for num in array:
        if num == 1:
            continue

        if isOK[num] is False:
            return False

        for div in range(2, int(num ** 0.5) + 1):
            div = 2
            if num % div == 0:
                while num % div == 0:
                    num //= div
                if isOK[div] is False:
                    return False
                else:
                    isOK[div] = False

        if num != 1:
            if isOK[num] is False:
                return False
            else:
                isOK[num] = False

    return True


n = int(input())
a = list(map(int, input().split()))

pairwiseFlag = judge_pairwise(a, 10 ** 6)

total = a[0]
for num in a:
    total = gcd(total, num)
if total == 1:
    setwiseFlag = True
else:
    setwiseFlag = False

if pairwiseFlag is True:
    print("pairwise coprime")
elif setwiseFlag is True:
    print("setwise coprime")
else:
    print("not coprime")
