import sys
import math
import collections
import bisect
import itertools
import decimal

# import numpy as np

# sys.setrecursionlimit(10 ** 6)
INF = 10 ** 20
MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline().rstrip())
ns = lambda: map(int, sys.stdin.readline().rstrip().split())
na = lambda: list(map(int, sys.stdin.readline().rstrip().split()))
na1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().rstrip().split()))


# ===CODE===


def main():
    n = ni()
    a = na()

    seta = set(a)
    if len(seta) == 1:
        print("not coprime")
        exit(0)


    # 素因数分解　10**12でもOK
    def prime_factorize(n):
        a = set()
        while n % 2 == 0:
            a.add(2)
            n //= 2
        f = 3
        while f * f <= n:
            if n % f == 0:
                a.add(f)
                n //= f
            else:
                f += 2
        if n != 1:
            a.add(n)
        return a

    gcd = [set() for _ in range(n)]
    for i, ai in enumerate(a):
        gcd[i] = prime_factorize(ai)

    total = set()

    pc = True
    for i in range(n):
        flg = True
        for td in gcd[i]:
            if td in total:
                flg = False
                break
            else:
                total.add(td)
        if not flg:
            pc = False
            break

    tc = True
    if len(gcd[0]) == 0:
        tc = True

    for td in gcd[0]:
        flg = True
        for i in range(1, n):
            if td not in gcd[i]:
                flg = False
                break
        if flg:
            tc = False
            break

    if pc:
        print("pairwise coprime")
    elif tc:
        print("setwise coprime")
    else:
        print("not coprime")


if __name__ == '__main__':
    main()
