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

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

N = int(input())
A = list(map(int, input().split()))
dic = defaultdict(int)


def divisor(n: int) -> list:
    res = []
    if n == 1:
        return [1]

    for i in range(1, n):
        if n % i == 0:
            res.append(i)
            if i > 1:
                dic[i]+=1
            if i != n / i:
                res.append(int(n / i))
                dic[int(n / i)] += 1
        if (i + 1) * (i + 1) > n:
            # res.sort()
            return res

for a in A:
    res = divisor(a)

flg_pair = True
flg_step = True

for a in dic.values():
    if a > 1:
        flg_pair = False
    if a == N:
        flg_step = False

if flg_pair:
    print('pairwise coprime')
elif flg_step:
    print('setwise coprime')
else:
    print('not coprime')
