def gcd(a, b):
    if a < b:
        return gcd(b, a)
    elif a % b == 0:
        return b
    else:
        r = a % b
        return gcd(b, r)

N = int(input())
A = list(map(int, input().split()))

p1 = A[0]
p2 = A[0]
p3 = A[0]
for i in range(1, N):
    p1 *= A[i]
    p2 = gcd(A[i], p2)
    p3 = p3 * A[i] // gcd(A[i], p3)

flg_set = p2 == 1
flg_pair = p1 == p3
if flg_set:
    if flg_pair:
        print("pairwise coprime")
    else:
        print("setwise coprime")
else:
    print("not coprime")