from math import gcd
from collections import defaultdict

upper = 10**6
N = int(input())
A = list(map(int, input().split()))
num = defaultdict(int)

g = 0
for a in A:
    g = gcd(g, a)
    num[a] += 1

isStopped = False
for i in range(2, upper+1):
    x = 0
    for j in range(i, upper+1, i):
        x += num[j]
    if x >= 2:
        isStopped = True
        break

if not isStopped:
    print("pairwise coprime")
elif g == 1:
    print("setwise coprime")
else:
    print("not coprime")

