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)
}

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

	isPairwise := true
	for i := 0; i < n-1; i++ {
		for j := i + 1; j < n; j++ {
			if gcd(as[i], as[j]) != 1 {
				isPairwise = false
				break
			}
		}
	}
	if isPairwise {
		fmt.Println("pairwise coprime")
		return
	}

	a := as[0]
	for i := 1; i < n; i++ {
		a = gcd(a, as[i])
	}
	if a == 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)
}
