from math import gcd
from functools import reduce
from collections import Counter

N = int(input())
*A, = map(int, input().split())

m = max(A)

n = int(m**0.5)+1
is_prime = [True]*(n+1)
is_prime[0] = is_prime[1] = False
for i in range(2, int(n**0.5)+1):
    if not is_prime[i]:
        continue
    for j in range(i*2, n+1, i):
        is_prime[j] = False
primes = [i for i in range(n+1) if is_prime[i]]


for p in primes:
    flag = 0
    for i in range(N):
        if A[i] % p == 0:
            if flag:
                break
            flag = 1
    else:
        continue

    # not pairwise coprime
    gcd_set = reduce(gcd, A)
    if gcd_set == 1:
        print("setwise coprime")
    else:
        print('not coprime')
    exit()

C = Counter(A)
for k, v in C.items():
    if v > 1:
        gcd_set = reduce(gcd, A)
        if gcd_set == 1:
            print("setwise coprime")
        else:
            print('not coprime')
        exit()
print('pairwise coprime')
