package main

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

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

	n := nextInt()

	as := make([]int, n)
	dm := make(map[int]int)
	used := make(map[int]bool)
	for i := 0; i < n; i++ {
		as[i] = nextInt()
		if used[as[i]] {
			continue
		}
		used[as[i]] = true

		ps := primeFactorization(as[i])
		for p := range ps {
			dm[p]++
		}
	}

	gg := make([]int, n+1)
	for i := 0; i < n; i++ {
		gg[i+1] = gcd(gg[i], as[i])
	}

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

	for k, v := range dm {
		if k == 1 {
			continue
		}
		if v > 1 {
			fmt.Println("setwise coprime")
			return
		}
	}

	fmt.Println("pairwise coprime")
}

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

func primeFactorization(n int) map[int]int {
	ps := make(map[int]int)
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			ps[i]++
			n /= i
		}
	}
	if n != 1 {
		ps[n]++
	}

	return ps
}

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
}
