import math
N = int(input())
A = list(map(int,input().rstrip().split(" ")))
M = int(math.sqrt(max(A))) + 1
sosuu = [2]
for i in range(3,M,2):
    for j in sosuu:
        if i % j == 0:
            break
    else:
        sosuu.append(i)

lis = [0 for i in range(1000)]
for i in A:
    for j in sosuu:
        if i % j == 0:
            lis[j] += 1
pair = True
setw = True
for i in sosuu:
    if lis[i] == len(A):
        setw = False
    if lis[i] >= 2:
        pair = False
if pair:
    print("pairwise coprime")
elif setw:
    print("setwise coprime")
else:
    print("not coprime")