import sys
import heapq
import math
import fractions
import functools
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        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

p=[0]*10**6
N=int(input())
A=sorted(lmp())

for i in A:
    l=factorization(i)
    for k in l:

        p[k[0]]+=1
for i in p:
    if i==N:
        print("not coprime")
        exit()

    if i>=2:
        print("setwise coprime")
        exit()
print("pairwise coprime")