import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr

N = i()
A = l()
li = []
num = [0]*(10**6+1)
for i in range(N):
    for j in factorization(A[i]):
        if j not in li:
            li.append(j)
        else:
            num[j] += 1
if max(num) == 0:
    print('pairwise coprime')
elif max(num) == N-1:
    print('not coprime')
else:
    print('setwise coprime')