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() {
	const(int)[] createPrimes() {
		auto ps = new bool[10 ^^ 6 + 1];
		ps[] = true;
		ps[0] = false;
		ps[1] = false;

		foreach (size_t i, e;ps) {
			if (!e) {
				continue;
			}
			for (auto j = i + i;j < ps.length;j += i) {
				ps[j] = false;
			}
		}

		auto primes = new int[0];
		foreach (i, e;ps) {
			if (e) {
				primes ~= cast(int)i;
			}
		}
		return primes;
	}

	readln;
	auto a = readln.chomp.split(' ').map!(to!int).array;

	auto primes = createPrimes();
	auto used = new int[primes.length];

	foreach (e;a) {
		foreach (size_t i, p;primes) {
			if (e < p) {
				break;
			}
			if (e % p == 0) {
				++used[i];
			}
		}
	}

	auto pairwise = true, setwise = true;

	foreach (e;used) {
		if (e >= a.length) {
			setwise = false;
		}
		if (e > 1) {
			pairwise = false;
		}
	}

	if (pairwise) {
		writeln("pairwise coprime");
	} else if (setwise) {
		writeln("setwise coprime");
	} else {
		writeln("not coprime");
	}
}
