import math

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

def pri_maker(n):
    li=[x for x in range(3,n+1,2)]
    pri=[2]
    for i in range(n):
        if pri[-1]**2>n:
            pri+=li
            break
        else:
            pri.append(li[0])
            li=[int(x) for x in li if x%pri[-1]!=0]
        if len(li)==0:
            break
    return pri

GCD = A[0]
for i in range(1, N):
    GCD = math.gcd(GCD, A[i])

if GCD > 1:
    print('not coprime')
else:
    pri = pri_maker(1001)
    pri_dic = dict()
    for x in pri:
        pri_dic[x] = 0

    for i in range(N):
        j = 0
        while pri[j] <= A[i]:
            if A[i] % pri[j] == 0:
                if pri_dic[pri[j]] == 0:
                    pri_dic[pri[j]] += 1
                else:
                    print('setwise coprime')
                    exit()
                while A[i] % pri[j] == 0:
                    A[i] //= pri[j]                
            j += 1
            if j == len(pri):
                pri.append(A[i])
                pri_dic[A[i]] = 1

    print('pairwise coprime')