import math

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

def gcd_n(xs):
    if len(xs) == 1:
        return xs[0]
    return math.gcd(xs[0], gcd_n(xs[1:]))


if gcd_n(A) != 1:
    print("not coprime")
    exit()

for i in range(N):
    for j in range(i + 1, N):
        if math.gcd(A[i], A[j]) != 1:
            print("setwise coprime")
            exit()
print("pairwise coprime")