from math import gcd
n = int(input())
a = [int(i) for i in input().split()]

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

m = max(a)
fac = [1]*(m+1)
for i in range(2,m+1):
    if fac[i] != 1: continue
    for j in range(i,m+1,i): fac[j] = i
s = set()
for i in range(n):
    x = fac[a[i]]
    if x in s:
        print("setwise coprime")
        exit()
    s.add(x)
print("pairwise coprime")