import math
from functools import reduce

n = int(input())
a = list(map(int, input().split()))

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

s = set()
for i in a:
    for j in factorization(i):
        if j not in s:
            s.add(j)
        else:
            if gcd_list(a) == 1:
                print('setwise coprime')
                exit()
            else:
                print('not coprime')
                exit()
print('pairwise coprime')
