import numpy as np


def main():
    n = int(input())
    A = list(map(int, input().split()))

    counts = [0] * (10**6 + 1)
    for a in A:
        counts[a] += 1

    A = np.array(A, dtype=np.int64)

    ans = 0
    for i in range(2, 10**6+1):
        co_primes = A[i+i::i].sum()
        if ans < co_primes:
            ans = co_primes

    if ans == 1:
        print("pairwise coprime")
    elif ans < n:
        print("setwise coprime")
    else:
        print("not coprime")


if __name__ == "__main__":
    main()
