#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define Rep(n) for (ll _ = 0; _ < (ll)(n); _++)

template<class S>S sum(vector<S>&a){return accumulate(all(a),S());}
template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}
ll max(int a,ll b){return max((ll)a,b);} ll max(ll a,int b){return max(a,(ll)b);}
ll min(int a,ll b){return min((ll)a,b);} ll min(ll a,int b){return min(a,(ll)b);}
template <class S> void print(vector<S> &v){for(ll i=0; i<(ll)v.size(); i++){cerr << v[i] << ' ';}cerr << endl;}
template <class S> void print(vector<vector<S>> &v) {for (ll i = 0; i < (ll)v.size(); i++) {for (ll j = 0; j < (ll)v[i].size(); j++) {cerr << v[i][j] << ' ';}cerr << endl;}}

void Main();

int main(){
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(20);
	Main();
	return 0;
}

vector<ll> prime_enum(ll n){
    vector<ll> res;
    vector<bool> is_prime(n, true);
    is_prime[0] = false;
    is_prime[1] = false;
    for(ll i = 2; i < n; i++){
        if(!is_prime[i]) continue;
        res.push_back(i);
        for(ll j = 2; i * j < n; j++){
            is_prime[i * j] = false;
        }
    }
    return res;
}

void Main(){
	int n; cin >> n;
	auto primes = prime_enum(n);
	vector<bool> isused(primes.size(), false);
	vector<int> idx(n+1,0);
	rep(i,primes.size()){
		idx[primes[i]] = i;
	}
	int g;
	cin >> g;
	rep(i,primes.size()){
		if(g % primes[i] == 0){
			isused[i] = true;
		}
	}
	bool pairwise = true;
	Rep(n-1){
		int t; cin >> t;
		g = gcd(g, t);
		rep(i,primes.size()){
			if(!pairwise) break;
			if(primes[i] * primes[i] > t){
				if(t > 1){
					if(isused[idx[t]]) pairwise = false;
					isused[idx[t]] = true;
					break;
				}
			}
			if(t % primes[i] == 0){
				if(isused[i]) pairwise = false;
				isused[i] = true;
				while(t % primes[i] == 0){
					t /= primes[i];
				}
			}
		}
	}
	if(pairwise){
		cout << "pairwise coprime\n";
	}else if(g == 1){
		cout << "setwise coprime\n";
	}else{
		cout << "not coprime\n";
	}
}