package main

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

var scanner = bufio.NewScanner(os.Stdin)

func NextStr() string {
	scanner.Scan()
	return scanner.Text()
}

func NextInt() int {
	i, _ := strconv.Atoi(NextStr())
	return i
}

func Gcd(x, y int) int {
	if x < y {
		x, y = y, x
	}
	for y > 0 {
		x, y = y, x%y
	}
	return x
}

func SqrtInt(x int) float64 {
	float_x := float64(x)
	return math.Sqrt(float_x)
}

func Sieve(n int) []int {
	var isPrime [2000000 + 5 + 1]bool
	D := make([]int, 2000000+5+1)
	for i := 0; i < len(D); i++ {
		D[i] = i
	}

	for i := 0; i <= n; i++ {
		isPrime[i] = true
	}

	isPrime[0] = false
	isPrime[1] = false

	for i := 2; i <= n; i++ {
		if isPrime[i] {

			for j := 2 * i; j <= n; j += i {
				isPrime[j] = false
				D[j] = i
			}
		}
	}
	return D
}

func PrimeFactorization(n int, D []int) []int {
	var primes []int
	for n > 1 {
		prime := D[n]
		primes = append(primes, prime)
		for D[n] == prime {
			n /= prime
		}
	}
	return primes
}

func Contains(n int, A []int) bool {
	for _, e := range A {
		if n == e {
			return true
		}
	}
	return false
}

const MaxA = 1000000

func main() {

	scanner.Split(bufio.ScanWords)
	D := Sieve(MaxA)

	n := NextInt()
	res := NextInt()

	var AllPrimes []int
	var PrimesCount int
	primes := PrimeFactorization(res, D)
	AllPrimes = append(AllPrimes, primes...)
	PrimesCount += len(primes)

	for i := 0; i < n-1; i++ {
		Ai := NextInt()
		res = Gcd(res, Ai)
		primes := PrimeFactorization(Ai, D)
		PrimesCount += len(primes)
		for _, p := range primes {
			if !Contains(p, AllPrimes) {
				AllPrimes = append(AllPrimes, p)
			}
		}
	}

	var ans string
	if res != 1 {
		ans = "not coprime"
	} else if len(AllPrimes) == PrimesCount {
		ans = "pairwise coprime"
	} else {
		ans = "setwise coprime"
	}

	fmt.Println(ans)
}
