n = int(input())
a = list(map(int, input().split()))
divs = [0 for _ in range(max(a)+1)]

for x in a:
    for i in range(1, int(x**0.5)+1):
        if x%i == 0:
            divs[i] += 1
            if i != x//i:
                divs[x//i] += 1

divs[1] = 0
div_max = max(divs)
if div_max == 1:
    print('pairwise coprime')
elif div_max == n:
    print('not coprime')
else:
    print('setwise coprime')