N = int(input())
A = list(map(int, input().split()))
MAX= 10**6

from math import gcd, sqrt
g = A[0]
# g_list = [A[0]]
for i in range(1, N):
    g = gcd(g, A[i])
    # g_list.append(g)
if g != 1:
    print("not coprime")
    exit()
else:
    def makePrimeChecker(n):
        """
        エラトステネスの篩.
        nまでの自然数が素数かどうかを表すリストを返す.
        """
        isPrime = [True] * (n + 1)
        isPrime[0] = False
        isPrime[1] = False
        for i in range(2, int(n ** 0.5) + 1):
            if isPrime[i]:
                for j in range(i * i, n + 1, i):
                    isPrime[j] = False
        return isPrime

    is_prime = makePrimeChecker(MAX)
    used_prime = [0]*(MAX+1)
    primes = [n for n in range(2, MAX+1) if is_prime[n]]

    # def factorization(n, used_prime):
    #     arr = []
    #     temp = n
    #     is_ok = 1
    #     for i in range(2, int(-(-n**0.5//1))+1):
    #         if temp%i==0:
    #             cnt=0
    #             if used_prime[i]:
    #                 is_ok = 0
    #                 break
    #             while temp%i==0:
    #                 cnt+=1
    #                 temp //= i
    #             arr.append([i, cnt])
    #             used_prime[i] = 1

    #     if is_prime[temp]:
    #         if used_prime[temp]:
    #             is_ok = 0
    #         # arr.append([temp, 1])
    #         used_prime[temp] = 1


    #     if is_prime[n]:
    #         # arr.append([n, 1])
    #         if used_prime[n]:
    #             is_ok = 0
    #         used_prime[n] = 1
    #     return is_ok, used_prime

    # def divisor(num):
    #     max_num = int(sqrt(num))
    #     divisor_list = []
    #     for i in range(1, max_num + 1):
    #         if num % i == 0:
    #             divisor_list.append(i)
    #             divisor_list.append(num//i)
        
    #     return divisor_list

    
    is_ok = 1
    for p in primes:
        for a in A:
            if a % p == 0:
                if used_prime[p]:
                    is_ok = 0
                    break
                used_prime[p] = 1
        if not is_ok:
            break
    if is_ok:
        print("pairwise coprime")
    else:
        print("setwise coprime")
        