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
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)

def primes(n):
    ass = []
    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
    for i in range(len(is_prime)):
        if is_prime[i]:
            ass.append(i)
    return ass

N = i()
A = l()
F = 0
p = primes(10**6)
for i in range(N):
    num = A[i]
    for j in p:
        if num%j == 0:
            for i in range(100):
                if num%j==0:
                    num //= j
                else:
                    break
            p.remove(j)
    print(num)
    if num != 1:
        F = 1
        break
if F == 0:
    print('pairwise coprime')
elif gcd(A) == 1:
    print('setwise coprime')
else:
    print('not coprime')