package main

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

var sc = bufio.NewScanner(os.Stdin)

func scanInt() int {
	num, _ := strconv.Atoi(scanString())
	return num
}

func scanString() string {
	sc.Scan()
	return sc.Text()
}

func scanInts(n int) []int {
	sl := make([]int, n)
	for i := range sl {
		sl[i] = scanInt()
	}
	return sl
}

func init() {
	sc.Split(bufio.ScanWords)
}

const mod = 10000000007

func main() {
	n := scanInt()
	as := scanInts(n)

	isPairwise := true
	a, m := as[0], as[0]
	for i := 1; i < n; i++ {
		a = lcm(a, as[i])
		a %= mod
		m *= as[i]
		m %= mod
		if a != m {
			isPairwise = false
			break
		}
	}
	if isPairwise {
		fmt.Println("pairwise coprime")
		return
	}

	b := as[0]
	for i := 1; i < n; i++ {
		b = gcd(b, as[i])
	}
	if b == 1 {
		fmt.Println("setwise coprime")
	} else {
		fmt.Println("not coprime")
	}
}

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

func lcm(a, b int) int {
	return a / gcd(a, b) * b
}
