#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];
	for(int x : A){
		g = __gcd(g,x);
	}
	if(g > 1){
		cout << "not coprime" << endl;
		return;
	}
	map<int,int> m;
	for(int i = 0; i < n; i++){
		for(int j = 2; j*j <= A[i]; j++){
			if(A[i] % j == 0){
				m[j]++;
				m[A[i]/j]++;
				if(m[j] == 2 || m[A[i]/j] == 2){
					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;
}