
#!/usr/bin/python
# -*- coding: utf-8 -*-

# def
def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(map(int,input().split())))
    return np.array(x)

def str_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(input()))
    return np.array(x)

def int_map():
    return map(int,input().split())

def int_list():
    return list(map(int,input().split()))

def print_space(l):
    return print(" ".join([str(x) for x in l]))

# import
import numpy as np
import collections as col

import math
from functools import reduce

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

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

# main code
N = int(input())
A = int_list()

AA = [x for x in A if not x == 1]

b = gcd(*A)

s = set()

if not b == 1:
    print("not coprime")
else:
    num = 0
    for aa in AA:
        v = factorization(aa)
        num += len(v)
        for i in range(0,len(v)):
            s.add(v[i][0])
    
    if len(s) == num:
        print("pairwise coprime")
    else:
        print("setwise coprime")


