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

is_pc = True
is_sc = True

i = 2
t = [int(x % i == 0) for x in a]
s = sum(t)
if s >= 2:
    is_pc = False
if s == N:
    is_sc = False

for i in range(3, 1000, 2):
    t = [int(x % i == 0) for x in a]
    s = sum(t)
    if s >= 2:
        is_pc = False
    if s == N:
        is_sc = False
        break
if is_pc:
    print('pairwise coprime')
elif is_sc:
    print('setwise coprime')
else:
    print('not coprime')