# -*- coding: utf-8 -*-


def run_prime_factorization(max_number: int) -> dict:
    '''Run prime factorization.
    Args:
        max_number: Int of number (greater than 1).
    Returns:
        A dictionary's items ((base, exponent) pairs).
    Landau notation: O(log n)
    '''

    from math import sqrt

    ans = dict()
    remain = max_number

    for base in range(2, int(sqrt(max_number)) + 1):
        if remain % base == 0:
            exponent_count = 0

            while remain % base == 0:
                exponent_count += 1
                remain //= base

            ans[base] = exponent_count

    if remain != 1:
        ans[remain] = 1

    return ans


def main():
    import sys
    input = sys.stdin.readline

    n = int(input())
    a = list(map(int, input().split()))
    numbers = [0 for _ in range(10 ** 6 + 1)]

    for ai in a:
        p = run_prime_factorization(ai)

        if p:
            for key, value in p.items():
                numbers[key] += 1
        else:
            numbers[1] += 1

    if numbers[1] == n:
        print("pairwise coprime")
    elif max(numbers) == 1:
        print("pairwise coprime")
    elif max(numbers) == n:
        print("not coprime")
    else:
        print("setwise coprime")


if __name__ == '__main__':
    main()
