from math import gcd   # gcd(6, 4) -> 2
from functools import reduce


def gcd_list(numbers):
    return reduce(gcd, numbers)


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)
    if temp!=1:
        arr.append(temp)
    if arr==[]:
        arr.append(n)
    return arr


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

a = []

for i in range(N):
    if A[i] != 1:
        a.extend(factorization(A[i]))

if len(set(a)) == len(a):
    print('pairwise coprime')
    exit()

if gcd_list(A) == 1:
    print('setwise coprime')

else:
    print('not coprime')