from functools import reduce
from math import gcd

n = int(input())
A = list(int(x) for x in input().split())

if reduce(gcd, A) != 1:
    print("not coprime")
    exit()

def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    ret = [2]
    limit = int(n**0.5)
    data = [i for i in range(3, n + 1, 2)]
    while True:
        p = data[0]
        if p >= limit:
            break
        else:
            ret.append(p)
            data = [e for e in data if e % p != 0]
    return ret + data

sieve = get_sieve_of_eratosthenes(10**3)
for prime in sieve:
    count = 0
    for a in A:
        if a % prime == 0:
            count += 1
        if count > 1:
            print("setwise coprime")
            exit()

print("pairwise coprime")
