from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

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

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

B = set()
count = 0
sc = 1
flag = 0
sc_flag = 0

for i in range(N):
    f = factorization(A[i])

    if f[0][0] != 1:
        if flag == 0:
            C = set()
            for ff in f:
                C.add(ff[0])
            flag = 1
        for ff in f:
            B.add(ff[0])
            if ff[0] in C:
                sc = 0
            count += 1
    else:
        sc_flag = 1

if count == len(B):
    print("pairwise coprime")
elif sc == 1 or sc_flag ==1:
    print("setwise coprime")
else:
    print("not coprime")
