from math import gcd
from collections import defaultdict
import sys
N = int(input())
a_ls = list(map(int, input().split()))
now_gcd = a_ls[0]
all_one = True
if a_ls[0] != 1:
    all_one = False
for i in range(1,N):
    now_gcd = gcd(a_ls[i],now_gcd)
    if a_ls[i] != 1:
        all_one = False
if now_gcd != 1:
    print('not coprime')
    sys.exit()
if all_one:
    print('pairwise coprime')
    sys.exit()

def factorization(n):
    '''
    [base,power]のリストを返す
    '''
    arr = []
    temp = n
    for i in range(2, int(n**0.5) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i,cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr == []:
        arr.append([n,1])

    return arr

prime_times = defaultdict(int)
for a in a_ls:
    arr = factorization(a)
    for base,p in arr:
        prime_times[base] += 1

res = 'pairwise coprime'
for times in prime_times.values():
    if times > 1:
        res = 'setwise coprime'
        break
print(res)