#!/usr/bin/env python
from math import sqrt

def gen_primes(X):
    is_prime = [True for _ in range(0, X+1)]
    is_prime[0] = False
    is_prime[1] = False
    primes = []
    for n in range(2, int(sqrt(X))):
        if is_prime[n]:
            primes.append(n)
            j = n*2
            while j <= X:
                is_prime[j] = False
                j += n
    primes.extend([x for x in range(int(sqrt(X)), X+1) if is_prime[x]])
    return primes


def solve(N, A):
    primes = gen_primes(10**6)
    C = [0] * len(primes)

    for a in A:
        for i, p in enumerate(primes):
            if a % p == 0:
                C[i] += 1
    M = max(C)
    #print(A)
    #print(M)
    if M <= 1:
        print("pairwise coprime")
    elif M != N:
        print("setwise coprime")
    else:
        print("not coprime")
    
N = int(input())
A = [int(x) for x in input().split()]
solve(N, A)
