import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
N = int(input())
def primes(n):#nまでの素数を列挙0は入れちゃダメ
    is_prime = [True]*(n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2,int(n**(0.5)+1)):
        if not is_prime[i]:
            continue
        for j in range(i*2,n+1,i):
            is_prime[j] = False
    return is_prime
A = list(map(int,input().split()))
MAX = max(A)
prime = primes(MAX)
pri = [i for i in  range(2,MAX+1) if prime[i]]
n = len(pri)
cnt = defaultdict(int)
def factorization(n): #2以上の整数n => [[素因数, 指数], ...]の2次元リストを返す
    arr = []
    temp = n
    for i in pri:
        if i > int(n**0.5):
            break
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr
def factorization1(n): #2以上の整数n => [[素因数, 指数], ...]の2次元リストを返す
    arr = []
    temp = n
    for i in pri:
        if i > int(n**0.5) or i > MAX/N:
            break
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        if temp > int(n**0.5) or temp >= MAX/N:
            arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr
flag1 = 0
flag2 = 0
if N >= n+2:
    flag1 = 1
    for i in range(N):
        a = A[i]
        li = factorization1(a)
        for tu in li:
            b = tu[0]
            cnt[b] += 1
    for i in pri:
        a = cnt[i]
        if a == N:
            flag2 = 1
            break
    if flag2 == 1:
        print("not coprime")
    else:
        print("setwise coprime")
else:
    for i in range(N):
        a = A[i]
        li = factorization(a)
        for tu in li:
            b = tu[0]
            cnt[b] += 1
    for i in pri:
        a = cnt[i]
        if a == N:
            flag2 = 1
        if a >= 2:
            flag1 = 1
    if flag1 == 0:
        print("pairwise coprime")
    elif flag2 == 1:
        print("not coprime")
    else:
        print("setwise coprime")
    
    


