if True:
    import math
    import fractions


    def make_prime_and_deleted_by_list(n):
        prime_list = [i for i in range(2, n+1)]
        deleted_by_list = [i for i in range(n+1)]
        pi = 0
        target_prime = prime_list[pi]
        while(target_prime < math.sqrt(n)):
            old_prime_list = prime_list.copy()
            prime_list = prime_list[:pi+1]
            for i in old_prime_list:
                if i % target_prime == 0:
                    deleted_by_list[i] = target_prime
                else:
                    if i > prime_list[pi]:
                        prime_list.append(i)
            pi += 1
            target_prime = prime_list[pi]
        return prime_list, deleted_by_list

    def make_factor_list(n, deleted_by_list, factor_list):
        if n == 1:
            return factor_list
        else:
            factor = deleted_by_list[n]
            factor_list.append(factor)
            return make_factor_list(int(n/factor), deleted_by_list, factor_list)

    def calc_gcd(As):
        ans = As[0]
        for i in range(1, len(As)):
            ans = fractions.gcd(ans, As[i])
        return ans
            
    N = int(input())
    As = list(map(int, input().split()))
    if As == [1 for i in range(N)]:
        print("pairwise coprime")
    else:
        _, d = make_prime_and_deleted_by_list(max(As))

        As_factor_list = []
        for A in As:
            As_factor_list.extend(set(make_factor_list(A, d, [])))

        if len(set(As_factor_list)) == len(As_factor_list):
            print("pairwise coprime")

        else:
            if calc_gcd(As) == 1:
                print("setwise coprime")
            else:
                print("not coprime")