from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

# エラトステネスの篩による素数判定（0:非素数，1：素数）
def make_is_prime(N):
    prime = [1 for i in range(N+1)]
    prime[0] = prime[1] = 0
    for i in range(2,N+1):
        if prime[i] == 0: continue
        j = i**2
        while (j <= N):
            prime[j] = 0
            j += i
    return prime

a = make_is_prime(10**3+1)
b = []

for i in range(len(a)):
    if a[i] == 1:
        b.append(i)

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

pc = 1
sc = 1

for i in b:
    count = 0
    ssc = 1
    for j in range(N):
        if A[j]%i != 0:
            count += 1
    if count <= N-2:
        pc = 0
    if count == 0:
        sc = 0

if pc == 1:
    print("pairwise coprime")
elif sc == 1:
    print("setwise coprime")
else:
    print("not coprime")
