import sys
from math import gcd
def input(): return sys.stdin.readline().strip()

def fast_prime_factorization(A, max_num):
    """
    リストAに現れる自然数全てをO(NlogN)で素因数分解する（NはリストAの長さ）
    max_numはAに現れる自然数の上界。
    """
    # エラトステネスの篩でprimes[i] = (iを割り切る最小の素数)を記録する
    primes = [1] * (max_num + 1)
    primes[0] = primes[1] = 0
    for i in range(2, int(max_num**0.5) + 1):
        if primes[i] != 1: continue
        for j in range(i, max_num + 1, i):
            primes[j] = i

    # factorization[i] = {p1:n1, p2:n2, ...} (A[i] = p1^{n1} * p2^{n2} * ...)
    factorization_list = [{} for _ in range(len(A))]
    for i, a in enumerate(A):
        while a > 1:
            if primes[a] not in factorization_list[i]:
                factorization_list[i][primes[a]] = 1
            else:
                factorization_list[i][primes[a]] += 1
            a //= primes[a]

    return factorization_list


def main():
    N = int(input())
    A =list(map(int, input().split()))

    all_gcd = A[0]
    for a in A:
        all_gcd = gcd(all_gcd, a)
    if all_gcd != 1:
        print("not coprime")
        return

    prime_factor_list = fast_prime_factorization(A, 10**6)
    d = set()
    for factor_dict in prime_factor_list:
        for prime in factor_dict:
            if prime in d:
                print("setwize coprime")
                return
            d.add(prime)
    print("pairwise coprime")




if __name__ == "__main__":
    main()
