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===
# N以下の素数列挙
def make_prime_nums(n):
    prime_nums = [2 if n >= 2 else None]
    for i in range(3, n + 1):
        for p in prime_nums:
            if p >= int(i ** (1 / 2)) + 1:
                prime_nums.append(i)
                break
            if i % p == 0:
                break
    return prime_nums


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

    prime = make_prime_nums(10 ** 3)

    pc = True
    tc = True

    for pi in prime:
        cnt = 0
        for i in range(n):
            flg = False
            if a[i] % pi == 0:
                cnt += 1
        if cnt > 1:
            pc = False
        if cnt == n:
            tc = False
            break

    ca = collections.Counter(a)
    for k, v in ca.items():
        if k > 1:
            if ca[k] > 1:
                pc = False
            if ca[k] == n:
                tc = False
                break

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


if __name__ == '__main__':
    main()
