
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <bitset>

typedef unsigned long long ULLONG;
typedef long long LLONG;
static const LLONG MOD_NUM = 1000000007; //998244353;

template<class _T> static void get(_T& a) {
	std::cin >> a;
}
template<class _T> static void get(_T& a, _T& b) {
	std::cin >> a >> b;
}
template<class _T> static void get(_T& a, _T& b, _T& c) {
	std::cin >> a >> b >> c;
}
template <class _T> static _T tp_abs(_T a) {
	if (a < (_T)0) {
		a *= (_T)-1;
	}
	return a;
}

static void E();

int main()
{
	E();
	fflush(stdout);
	return 0;
}

static void E()
{
	int N;
	get(N);

	int maxNum = 0;
	std::vector<int> ai(N);
	for (int i = 0; i < N; i++) {
		get(ai[i]);
		maxNum = std::max(maxNum, ai[i]);
	}

	std::vector<std::map<int, int>> primes(N);
	for (int i = 0; i < N; i++) {
		tp_getPrimes(ai[i], primes[i]);
	}

	bool pairwise = true;
	for (int num = 2; num * num <= maxNum; num++) {
		int gcdCount = 0;
		for (int i = 0; i < N; i++) {
			if (primes[i].find(num) != primes[i].end()) {
				gcdCount++;
			}
		}
		if (gcdCount == N) {
			printf("not coprime\n");
			return;
		}
		if (gcdCount > 1) {
			pairwise = false;
		}
	}
	const char* ans = "pairwise coprime\n";
	if (!pairwise) ans = "setwise coprime\n";
	printf(ans);
}
