import math
import sys
from functools import reduce


def eratosthenes(n):
    prime = [2]
    limit = int(n**0.5)
    prime_list = [i + 1 for i in range(2, n, 2)]
    while True:
        p = prime_list[0]
        if limit <= p:
            return prime + prime_list
        prime.append(p)
        prime_list = [e for e in prime_list if e % p != 0]

def prime_factorize(n):
    prime_list = eratosthenes(n)
    arr = []

    for p in prime_list:
        if n % p == 0:
            cnt = 0
            while n % p == 0:
                n //= p
                cnt += 1
            arr.append([p, cnt])
    
    return arr

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


def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

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

prime_list = eratosthenes(n)
check = [0]*(10**6)
pairwise = True

for x in a:
    for p in prime_list:
        if x % p == 0:
            if check[p]:
                pairwise = False
                break
            check[p] = 1
    if not pairwise:
        break

if pairwise:
    print('pairwise coprime')
    sys.exit()

if gcd_list(a) == 1:
    print('setwise coprime')
else:
    print('not coprime')
