#abc177 e
import sys,math,collections,itertools
input = sys.stdin.readline


N=int(input())
A=list(map(int,input().split()))
num = [0]*(10**6+1)

def primes_dict(n):
    #
    prime_list = []
    non_prime_list = []
    k_list = []
    number_dict = {
        i: None for i in reversed(range(n + 1))}
    #
    del number_dict[0]
    del number_dict[1]
    while True:
        # get prime
        prime, _ = number_dict.popitem()
        prime_list.append(prime)
        if prime * prime > n:
            break

        # get non primes
        non_prime_list.append(prime * prime)
        while True:
            k, _ = number_dict.popitem()
            k_list.append(k)
            if prime * k > n:
                break
            non_prime_list.append(prime * k)

        while k_list:
            number_dict[k_list.pop()] = None

        # delete non prime
        while non_prime_list:
            del number_dict[non_prime_list.pop()]

    while number_dict:
        prime, _ = number_dict.popitem()
        prime_list.append(prime)

    return prime_list

P = primes_dict(10**6)

for a in A:
    if a == 1:
        continue
    else:
        num[a]+=1
        i=0
        while P[i]**2<=a:
            if a%P[i]==0:
                num[P[i]]+=1
                while a%P[i] ==0:
                    a=a//P[i]
            i +=1

mn = max(num)

if mn == 1:
    print('pairwise coprime')
elif mn ==N:
    print('not coprime')
else:
    print('setwise coprime')
