package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	sc.Split(bufio.ScanWords)

	n := nextInt()
	ps := primes(1e6 + 10)
	as := make([]int, n)
	gs := make([]int, n+1)
	pm := make(map[int]int)
	for i := 0; i < n; i++ {
		as[i] = nextInt()
		gs[i+1] = gcd(gs[i], as[i])
		pf := primeFactoriation(as[i], ps)
		for p := range pf {
			pm[p]++
		}
	}

	if gs[n] != 1 {
		fmt.Println("not coprime")
		return
	}

	for p, c := range pm {
		if p > 1 && c > 1 {
			fmt.Println("setwise coprime")
			return
		}
	}

	fmt.Println("pairwise coprime")
}

func primes(n int) []int {
	ps := make([]int, n+1)
	for i := 0; i <= n; i++ {
		ps[i] = i
	}
	for i := 2; i*i <= n; i++ {
		if n%i == 0 {
			for j := i + i; j < n; j += i {
				if ps[j] == j {
					ps[j] = i
				}
			}
		}
	}
	return ps
}

func primeFactoriation(n int, ps []int) map[int]int {
	pm := make(map[int]int)
	for n > 1 {
		pm[ps[n]]++
		n /= pm[ps[n]]
	}
	if n != 1 {
		pm[n]++
	}

	return pm
}

func gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}
