import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.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


def list_check(list1, list2):
    for i in list1:
        if i in list2:
            return True
    return False
    # return set(list1).issubset(list2)

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

so_list = []
no_pairwise = False
no_setwise = False
for a in A:
    fac_list = factorization(a)
    # print(fac_list, so_list, no_pairwise)
    if list_check(fac_list, so_list):
        no_pairwise = True
        break
    else:
        so_list.extend(factorization(a))

if gcd_list(A) != 1:
    no_setwise = True

if not no_pairwise:
    print("pairwise coprime")
elif not no_setwise:
    print("setwise coprime")
else:
    print("not coprime")
