#include <bits/stdc++.h>
using namespace std;
#define SPEED ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long
#define ld long double
const ll mod = 1000000007;
int main()
{
	SPEED
	int n;
	cin >> n;
	int arr[n];
	for (int i = 0; i < n; ++i)
	{
		cin >> arr[i];
	}
	int g = arr[0];
	for (int i = 1; i < n; ++i)
	{
		g = __gcd(g, arr[i]);
	}
	if (g>1)
	{
		cout << "not coprime";
		return 0;
	}

	vector<int> nos;
	bool signal = false;
	for (int i = 0; i < n; ++i)
	{
		if(nos.size()==0)
		{
			nos.push_back(arr[i]);
			continue;
		}

		for (int j = 0; j < nos.size(); ++j)
		{
			if(__gcd(arr[i],nos[j])>1)
			{
				signal = true;
				break;
			}
		}
		if (signal)
		{
			break;
		}

		nos.push_back(arr[i]);
	}

	if (signal)
	{
		cout << "setwise coprime";
	}
	else
	{
		cout << "pairwise coprime";
	}
	return 0;
}