//FINISH WHAT YOU START!
#include<bits/stdc++.h>

#define fileIO freopen("input.txt", "r", stdin); freopen("output1.txt", "w", stdout);
#define IOS ios::sync_with_stdio(0);cin.tie(0); cout.tie(0);
#define inf ((long long) 1e18 )
#define mod 1000000007
#define int long long
#define endl '\n'
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define debug(x) cout << '>' << #x << ':' << x << '\n';
#define debug2(x,y) cout << '>' << #x << " = " << x << " & "<< #y <<" = "<< y << '\n';

using namespace std;

const int N = 2e5 + 7;
vector<int> a[N];
int vis[N];
int count1 = 0;

void dfs(int s) {
	vis[s] = 1;
	count1++;
	for (auto i : a[s]) {
		if (!vis[i])
			dfs(i);
	}
	return ;
}

int32_t main() {
	IOS
#ifndef ONLINE_JUDGE
	fileIO
#endif
	auto start = std::chrono::high_resolution_clock::now();
	int test;
	test = 1;
	// cin >> test;
	while (test--) {
		int n;
		cin >> n;
		int a[n];
		map<int, int> mp;
		for (auto &i : a)
			cin >> i;
		bool ok = true;
		int val = __gcd(a[0], a[1]);
		if (val != 1) {
			ok = false;
		}
		for (int i = 2; i < n ; i++) {
			val = __gcd(val, a[i]);
			if (val != 1)
				ok = false;
		}
		if (ok) {
			cout << "pairwise coprime" << endl;
			continue ;
		}
		if (val == 1) {
			cout << "setwise coprime" << endl;
			continue ;
		}
		cout << "not coprime" << endl;
	}

	auto stop = std::chrono::high_resolution_clock::now();
	auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(stop - start);

	cerr << "Time taken : " << ((long double)duration.count()) / ((long double) 1e9) << "s " << endl;

	return 0;
}
