use proconio::input;

fn gcd(a: u64, b: u64) -> u64 {
	if b == 0 {
		a
	} else {
		gcd(b, a % b)
	}
}

fn lcm(a: u64, b: u64) -> u64 {
	a * b / gcd(a, b)
}

fn main() {
	input! {
		n: usize,
		a: [u64; n],
	}

	let mut la = 1;
	let mut ga = 0;
	let mut ma = 1;

	for x in a {
		la = lcm(la, x);
		ga = gcd(ga, x);
		ma = ma * x;
	}

	if la == ma {
		println!("pairwise coprime");
	} else if ga == 1 {
		println!("setwise coprime");
	} else {
		println!("not coprime");
	}
}