package main

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

var sc, wr = bufio.NewScanner(os.Stdin), bufio.NewWriter(os.Stdout)

func scanString() string   { sc.Scan(); return sc.Text() }
func scanRunes() []rune    { return []rune(scanString()) }
func scanInt() int         { a, _ := strconv.Atoi(scanString()); return a }
func scanInt64() int64     { a, _ := strconv.ParseInt(scanString(), 10, 64); return a }
func scanFloat64() float64 { a, _ := strconv.ParseFloat(scanString(), 64); return a }

func scanInts(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = scanInt()
	}
	return res
}

func debug(a ...interface{}) { fmt.Fprintln(os.Stderr, a...) }

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

//•*¨*•.¸¸♪main•*¨*•.¸¸♪(　-ω-)ノ　(　・ω・)
func main() {
	defer wr.Flush()
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 10000), 1001001)

	n := scanInt()
	a := scanInts(n)
	b := a[0]
	for i := 0; i < n; i++ {
		b = gcd(a[i], b)
	}
	p := prime(1e3)
	ff := false
	for i := 0; i < len(p); i++ {
		f := false
		for j := 0; j < n; j++ {
			if a[j]%p[i] == 0 {
				if f {
					ff = true
				}
				f = true
			}
		}
	}
	if ff {
		if b == 1 {
			fmt.Fprintln(wr, "setwise coprime")
		} else {
			fmt.Fprintln(wr, "not coprime")
		}
	} else {
		fmt.Fprintln(wr, "pairwise coprime")
	}

}

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

func prime(n int) []int {
	res := make([]int, 0)
	f := make([]bool, n+1)
	var m int
	for m = 2; m*m <= n; m++ {
		if f[m] {
			continue
		}
		res = append(res, m)
		for i := m * m; i <= n; i += m {
			f[i] = true
		}
	}
	for i := m; i < n+1; i++ {
		if f[i] {
			continue
		}

		res = append(res, i)
	}
	return res
}
