import sys
import bisect
from functools import lru_cache
from collections import defaultdict
inf = float('inf')
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**6)
def input(): return sys.stdin.readline().rstrip()
def read():
  return int(readline())
def reads():
  return map(int, readline().split())
N=read()
A=list(reads())
import math
def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    dic=defaultdict(list)
    limit = math.sqrt(n)
    data = [i + 1 for i in range(1, n)]
    fulldata=data[:]
    while True:
        p = data[0]
        if len(data)==1:
            dic[p].append(p)
            return dic
        for e in fulldata :
            if e%p==0:
                dic[e].append(p)
        data = [e for e in data if e % p != 0]
data = get_sieve_of_eratosthenes(10**1)
dic=defaultdict(int)
res=""
for i in range(N-1,-1,-1):
  ls=data[A[i]]
  for lval in ls:
      dic[lval]+=1
  for j in range(len(ls)):
          if dic[ls[j]]!=1: 
              res=""
              break
          if j==len(ls)-1:
              res="pairwise coprime"
if res!="":
    print(res)
    exit()
for val in dic.values():
    if val==N:
        res="not coprime"
        print(res)
        exit()
print("setwise coprime")