import std.container;
import std.range;
import std.algorithm;
import std.array;
import std.string;
import std.conv;
import std.stdio;
import std.container;

void main() {
	readln;
	auto a = readln.chomp.split(' ').map!(to!int).array;
	auto c = new int[10 ^^ 6 + 1];
	foreach (e;a) {
		++c[e];
	}

	auto pairwise = true;
	foreach (i;2..c.length) {
		auto count = 0;
		for (auto j = i;j < c.length;j += i) {
			count += c[j];
		}
		if (count > 1) {
			pairwise = false;
			break;
		}
	}
	if (pairwise) {
		writeln("pairwise coprime");
		return;
	}

	int gcd(int x, int y) {
		if (y == 0) return x;
		return gcd(y, x % y);
	}
	if (a.reduce!gcd == 1) {
		writeln("setwise coprime");
		return;
	}

	writeln("not coprime");
}
