package main

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

func main() {
	sc.Split(bufio.ScanWords)
	n := nextInt()
	as := make([]int, n)
	gg := make([]int, n+1)
	for i := 0; i < n; i++ {
		as[i] = nextInt()
	}

	sort.Sort(sort.Reverse(sort.IntSlice(as)))

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

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

	dm := make(map[int]int)
	for i := 0; i < len(gg); i++ {
		divs := divisors(gg[i])
		for _, v := range divs {
			dm[v]++
		}
	}

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

	fmt.Println("pairwise coprime")
}

func divisors(n int) []int {
	ds := make([]int, 0)
	for i := 1; i*i <= n; i++ {
		if n%i == 0 {
			ds = append(ds, i)
			if i*i != n {
				ds = append(ds, n/i)
			}
		}
	}
	return ds
}

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
}
