#include<bits/stdc++.h>
using namespace std;
/*void mayank()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("Input.txt", "r", stdin);
	freopen("Output.txt", "w", stdout);
#endif
}*/
#define ll long long
#define inf 1e9
const int mxN = 1e6;
ll a[mxN + 10], b[mxN + 1];



int main()
{
	//mayank();
	ll n;
	cin >> n;

	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	ll ans = 0;
	ll flag = -10;
	ll sum = a[0];
	/*for (int i = 0; i < n - 1; ++i)
	{	ans = __gcd(a[i], a[i + 1]);
		// << ans << " ";
		if (ans == 1) {
			flag = i;
		} else {
			flag = -100;
			break;
		}
	}*/

	for (int i = 1; i < n; i++) {
		sum = __gcd(sum, a[i]);
		//cout << sum << " ";
		if (sum > 1) {
			flag = 1;
		}
	}

	//cout << endl << sum << " " << flag << " ";

	if (flag == 1 and sum == 1) {
		cout << "setwise coprime";
	} else if (sum == 1) {
		cout << "pairwise coprime";
	} else {
		cout << "not coprime";
	}

	return 0;
}