/***** author :  C0d1ngPhenomena *****/

#include <bits/stdc++.h>
#define endl "\n"
#define ll long long int
#define TestCases int T; cin>>T; while(T--)
#define rep(i,a,b) for(ll i = a; i < b; i++)
#define revrep(i,a,b) for(ll i = b-1; i >= a; i--)
#define vll vector<ll>
#define vvll vector < vll >
#define pll pair<ll, ll>
#define vpll vector <pll>
#define mp(x,y) make_pair(x,y)
#define mod 1000000007
#define inf 1000000000000000001;
#define all(c) c.begin(),c.end()
#define alld(c) c.begin(),c.end(),greater<int>()
#define mem(a,val) memset(a,val,sizeof(a))
#define f first
#define s second
#define pb push_back
using namespace std;

bool sortbysec(const pair<int, int> &a, const pair<int, int> &b)
{
	return (a.second < b.second);
}

set <int> divisors(int x)
{
	set <int> st;
	for (int i = 1; i * i <= x; ++i)
		if (x % i == 0)
			st.insert(i), st.insert(x / i);

	s.erase(1);
	return s;
}

int main()
{
	std::ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	int n;
	cin >> n;

	vector<int> v(n);
	bool ok = true;
	set<int> s1;

	for (int i = 0; i < n; i++)
		cin >> v[i];

	for (int i = 0; i < n; i++)
	{
		set<int> s2 = divisors(v[i]);

		for (auto &j : s2)
		{
			if (s1.count(j))
			{
				ok = false;
				break;
			}

			s1.insert(j);
		}

		if (!ok)
			break;
	}

	if (ok)
		cout << "pairwise coprime";
	else
	{
		ok = true;

		int gc = v[0];

		for (int i = 1; i < n; i++)
			gc = __gcd(gc, v[i]);

		if (gc != 1)
			ok = false;

		if (ok)
			cout << "setwise coprime";
		else
			cout << "not coprime";
	}

	return 0;
}





