function Main(input) {
	input = input.trim().split("\n").map(function(x) { return x.split(" ")});
	let N = parseInt(input[0][0], 10);
	let A = input[1].map(e => parseInt(e, 10));
	let Amap = Array.from({length: 1e6 + 1}, () => false);
	let ansFlag0 = false;
	let N2 = N;
	for (let i = 0; i < N; i++){
		if (Amap[A[i]]){
			ansFlag0 = true;
			N2 --;
			continue;
		}
		Amap[A[i]] = true;
	}

	let bitmap = Array.from({length: 1e6 + 1}, () => false);
	bitmap[0] = true;
	bitmap[1] = true;

	
	// let ansFlag1 = false;
	let countList = [];
	for (let i = 2; i < bitmap.length; i++){
		if (bitmap[i]) continue;
		let count = 0;
		let j = 1;
		if (Amap[i * j]){
			count ++;
		}
		for (j = 2; j <= (1e6 / i); j++){
			bitmap[i * j] = true;
			if (Amap[i * j]){
				count ++;
			}

		}
		countList.push(count);
	}
	countList.sort((a,b) => a - b);
	let ans = "pairwise coprime";
	if (ansFlag0) ans = "setwise coprime";
	for (let i = 0; i < countList.length; i++){
		if (countList[i] <= 1) continue;
		if(countList[countList.length - 1] < N2){

			ans = "setwise coprime";
		} else {
			ans = "not coprime";
		}
	}
	console.log(ans);
	
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
