#coding: utf-8

from collections import defaultdict
from functools import reduce
from math import gcd

N = int(input())
A = [int(x) for x in input().split()]

def primeFac(N):
    ret = set()
    i = 2
    while i*i <= N:
        if N % i == 0:
            ret.add(i)
            while N % i == 0:
                N //= i
        i += 1

    if N != 1:
        ret.add(N)
    return ret

numDiv = defaultdict(int) 
for a in A:
    for f in primeFac(a):
        numDiv[f] += 1
#print(numDiv, max(numDiv))
if max(numDiv.values()) == 1:
    print("pairwise coprime")
else:
    if (reduce(gcd, A) == 1):
        print("setwise coprime")
    else:
        print("not coprime")