from math import gcd

n = int(input())
A = list(map(int, input().split()))
maxA = 10**6+5

c = [0]*(maxA+1)
for a in A: c[a] += 1

memo = [False]*(maxA+1)
for i in range(2, maxA+1):
    if memo[i]: continue
    memo[i] = True
    cnt = c[i]
    for j in range(i*i, maxA+1, i):
        memo[j] = True
        cnt += c[j]
    if cnt >= 2:
        break
else:
    print('pairwise coprime')
    exit()

g = 0
for a in A:
    g = gcd(g, a)
if g == 1:
    print('setwise coprime')
else:
    print('not coprime')