import math
from numba import njit, i8 
import numpy as np

n = int(input())
alist = list(map(int,input().split()))
alist = np.array(alist)
a_max = max(alist)

D = [i for i in range(a_max+1)]
D = np.array(D)
D[0] = 1
D[1] = 1

@njit(i8[:](i8,i8[:]),cache=True)
def factor(n,D):
    f = set()
    f.add(n)
    while n > 1:
        f.add(D[n])
        n //= D[n]
    f.add(1)
    return np.array(list(f))

@njit(i8(i8,i8), cache=True)
def gcf(a,b):
    if a == 0:
        return b
    return gcf(b % a,a)

@njit((i8,i8[:],i8[:]),cache=True)
def main(n,alist,D):
    a_max = max(alist)
    p = 2
    top = math.ceil(math.sqrt(a_max))
    for i in range(2,top+1):
        if D[i] == i:
            p = i
            mul_p = p
            while mul_p <= a_max:
                D[mul_p] = min(p,D[mul_p])
                mul_p += p
    factor_set = set()
    pairwise = True
    for i in range(n):
        a = alist[i]

        a_factor = factor(a,D)
        for f in a_factor:
            if f != 1 and f in factor_set:
                pairwise = False
                break
            factor_set.add(f)

        if pairwise == False:
            break
    if pairwise == True: 
        print("pairwise coprime")
    else:
        #setwise
        now = alist[0]
        for i in range(1,n-1):
            now = gcf(now,gcf(alist[i],alist[i+1]))

        if now == 1:
            print("setwise coprime")
        else:
            print("not coprime")

main(n,alist,D)