# -*- coding: utf-8 -*-
# map(int, input().split())
import math
from collections import defaultdict

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

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+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

baisuu_dict = defaultdict(list)
for a in A:
    yakusuu = [y[0] for y in factorization(a)]
    for y in yakusuu:
        baisuu_dict[y].append(a)

is_pairwise = True
is_setwise = True
for prime, baisuu_list in baisuu_dict.items():
    if len(baisuu_list) >= 2:
        is_pairwise = False
    if len(baisuu_list) == len(A):
        is_setwise = False

if is_pairwise:
    print('pairwise coprime')
elif is_setwise:
    print('setwise coprime') 
else:
    print('not coprime')   