import math
N=int(input())
A=list(map(int,input().split()))
def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)
num=A[0]
for a in A:
    num=gcd(num,a)
if num!=1:
    print('not coprime')
else:
    def euler_phi(n):
        """1. nの素因数を列挙する"""
        tmp_n = n
        prime_factors = []
        for k in range(2, int(tmp_n ** 0.5) + 1):
            if tmp_n % k == 0:
                prime_factors.append(k)
                while tmp_n % k == 0:
                    tmp_n = tmp_n // k
        if tmp_n != 1:
            prime_factors.append(tmp_n)

        """2. 素因数について演算する"""
        len_prime = len(prime_factors)
        ans = 0
        for bit_state in range(1, 1 << len_prime):
            popcount = bin(bit_state).count("1")
            tmp = 1
            for i in range(len_prime):
                if (bit_state >> i) & 1:
                    tmp *= prime_factors[i]
                continue
            if popcount % 2 == 1:
                ans += cnt[tmp]
            else:
                ans -= cnt[tmp]

        return ans


    def make_divisors(n):
        """自然数nの約数を列挙したリストを出力する
        計算量: O(sqrt(N))
        入出力例: 12 -> [1, 2, 3, 4, 6, 12]
        """
        divisors = []
        for k in range(1, int(n ** 0.5) + 1):
            if n % k == 0:
                divisors.append(k)
                if k != n // k:
                    divisors.append(n // k)
        divisors = sorted(divisors)
        return divisors


    cnt = [0] * (10**6 + 1)
    for i in range(N):
        for j in make_divisors(A[i]):
            cnt[j] += 1

    ans=0
    for a in A:
        ans+=euler_phi(a)
    

    def combinations_count(n, r):
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


    if sum(cnt)-ans-1==combinations_count(N,2):
        print('pairwise coprime')
    else:
        print('setwise coprime')
