import sys
from math import gcd
n = int(input())
a = list(map(int, input().split()))

c = [0]*1000006
for i in range(n):
    c[a[i]] += 1

pairwise = True
for i in range(2, 1000006):
    cnt = 0
    for j in range(i, 1000006, i):
        cnt += c[j]
    if cnt > 1:
        pairwise = False

if pairwise:
    print("pairwise coprime")
    sys.exit()

g = 0
for i in range(n):
    g = gcd(g, a[i])
if g == 1:
    print("setwise coprime")
    sys.exit()

print("not coprime")
sys.exit()
