//Bismillahir Rahmanir Rahim
//Hope is a good thing, May be the best of things.. And no good thing ever dies
// Giving up was never an option <3
/* -----------------------------------------The Third Theme of Ainulindale----------------------------------------
Then again
Ilúvatar arose, and the Ainur perceived that his countenance was stern; and he
lifted up his right hand, and behold! a third theme grew amid the confusion,
and it was unlike the others. For it seemed at first soft and sweet, a mere
rippling of gentle sounds in delicate melodies; but it could not be quenched,
and it took to itself power and profundity. And it seemed at last that there
were two musics progressing at one time before the seat of Ilúvatar, and they
were utterly at variance. The one was deep and wide and beautiful, but slow
and blended with an immeasurable sorrow, from which its beauty chiefly
came. The other had now achieved a unity of its own; but it was loud, and
vain, and endlessly repeated; and it had little harmony, but rather a clamorous
unison as of many trumpets braying upon a few notes. And it essayed to
drown the other music by the violence of its voice, but it seemed that its most
triumphant notes were taken by the other and woven into its own solemn
pattern.
In the midst of this strife, whereat the halls of Ilúvatar shook and a
tremor ran out into the silences yet unmoved, Ilúvatar arose a third time, and
his face was terrible to behold. Then he raised up both his hands, and in one
chord, deeper than the Abyss, higher than the Firmament, piercing as the light
of the eye of Ilúvatar, the Music ceased.
*/
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
//template < class T > using oset = tree <T, null_type, less <T>, rb_tree_tag, tree_order_statistics_node_update>;
#define pb push_back
#define pii pair <int, int>
#define dbg(a) cout << #a << " => " << a << endl
#define pll pair <long long, long long >
#define PI (2.0 * acos(0.0))
#define testcase ll T; cin >> T; for (ll tc = 1; tc <= T; tc++)
const long long M = 1e5 + 10, M2 = 1e6 + 10, oo = 1e9 + 7;
bool ispr[M2];
ll ara[M2], sp[M2];
void sieve () {
	ispr[0] = 1, ispr[1] = 1;
	for (ll i = 2; i < M2; i++) {
		if (!ispr[i]) {
			sp[i] = i;
			for (ll j = i * i; j < M2; j += i) {
				ispr[j] = 1;
				sp[j] = i;
			}
		}
	}
}
vector < ll > pf[M2];
void fact () {
	for (ll n = 1; n < M2; n++) {
		ll tn = n;
		while (tn > 1) {
			ll f = sp[tn];
			pf[n].pb(f);
			while (tn % f == 0 && tn > 1) tn /= f;
		}
	}
}
ll cnt[M2];
void solve () {
	sieve(); fact();
	ll n;
	cin >> n;
	for (ll i = 0; i < n; i++) {
		cin >> ara[i];
		for (ll j = 0; j < pf[ara[i]].size(); j++) {
			cnt[pf[ara[i]][j]]++;
		}
	}
	ll mx = *max_element(cnt, cnt + M2);
	if (mx <= 1) cout << "pairwise coprime" << endl;
	else if (mx < n) cout << "setwise coprime" << endl;
	else cout << "not coprime" << endl;
}
int main () {
    //freopen("E:/newts/in.txt", "r", stdin);
    //freopen("E:/newts/out.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //testcase {
		//cout << "Case #" << tc << ": ";
        solve ();
    //}
    return 0;
}


/*
4
2 6 8 9
11 3 15 6
4 2 8 5
6 4 10 7
 */


Measured memory_bytes: 93856