from math import gcd
import sys

def sieve(N):
    # 昇順リストの用意
    A_list = [i for i in range(2, N+1)]
    limit = A_list[-1]

    # ふるいにかけられたかどうかを示すbooleanの辞書
    sieve = {i: True for i in A_list}

    # 順にふるいにかける
    for a in A_list:
        if not sieve[a]:
            continue
        for i in range(2*a, limit+1, a):  # 2a, 3a, 4a, ..., と調べる
            if i in sieve:
                sieve[i] = False

    # 結果をまとめる
    primes = []
    for a in A_list:
        if sieve[a]:
            primes.append(a)
    return primes


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


sorted_A = sorted(A)

is_pairwise = True  #同じ数が含まれるかどうか
global_gcd = A[0]
for i in range(1, N):
    if A[i-1] == A[i]:
        is_pairwise = False
    global_gcd = gcd(global_gcd, A[i])
    
if global_gcd > 1:
    print('not corprime')
    sys.exit()
elif not is_pairwise:
    print('setwise coprime')
    sys.exit()
else:
    if A[-1] < 4:
        print('pairwise corprime')
        sys.exit()
    # 素数列挙
    primes = sieve(A[-1])
    
    for p in primes:
        divided_once = False
        for a in sorted_A:
            if a % p == 0:
                if divided_once:
                    print('setwise corprime')
                    sys.exit()
                divided_once = True
    print('pairwise corprime')