#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define endl "\n"
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define F first
#define S second
#define bitcnt(v) __builtin_popcount(v)
#define all(v) v.begin(), v.end()

void solution(){
	int n; cin >> n;
	vector<int> A(n); for(int& x : A) cin >> x;
	int g = A[0];
	map<int,int> c;
	for(int x : A){
		g = __gcd((unsigned)g,(unsigned)x);
		c[x]++;
	}
	if(g > 1){
		cout << "not coprime" << endl;
		return;
	}
	int m = *max_element(all(A));
	for(int i = 2; i <= m; i++){
		int cur = 0;
		for(int j = i; j <= m; j += i){
			cur += c[j];
		}
		if(cur > 1){
			cout << "setwise coprime" << endl;
			return;
		}
	}
	cout << "pairwise coprime" << endl;
	return;
}	


int main(){ 
	fio;
	int t;
	t = 1;
	// cin >> t;
	for(int i = 1; i <= t; i++){
		// cout << "Case #" << i << ": ";
		solution();
	} 
	return 0;
}