#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

template <typename T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define ull unsigned long long int
#define ll long long int
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(),x.end()
#define MOD (ull)(double)(1e9 + 7)
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vb vector<bool>
#define vd vector<double>
#define vll vector<ll>
#define vpii vector<pii>
#define vpll vector<pll>
#define vvi vector<vi>
#define vvll vector<vll>
#define vs vector<string>
#define pull pair<ull, ull>
#define F first
#define S second
#define m_p make_pair
#define debug(x) cout << #x << " " << x << endl
#define printArr(a, start, end)for(int i=start ; i<end ; ++i)cout << a[i] << " ";cout << '\n';
#define readArr(a, start, end)for(int i=start ; i<end ; ++i)cin >> a[i];
#define read2D(mat, n, m)for(int i=0 ; i<n ; ++i)for(int j=0 ; j<m ; ++j)cin >> mat[i][j];

const long double PI = 3.141592653589793238462643383279502884197169399;

// Find Set LSB = (x&(-x)), isPowerOfTwo = (x & (x-1))

const ll N = 1e6+1;

void solve(){
	int n;
	cin >> n;
	
	vi a(N, 0), arr(n);
	int x;
	for(int i=0 ; i<n ; ++i){
		cin >> arr[i];
		++a[arr[i]];
	}
	
	vb prime(N, 1);prime[0] = prime[1] = 0;
	for(ll i=2 ; i<N ; ++i){
		if(prime[i]){
			for(ll j=i*i ; j<N ; j+=i){
				prime[j] = 0;
			}
		}
	}
	
	set<int> s;
	for(ll i=2 ; i<20 ; ++i){
		if(prime[i]){
			int cnt=0;
			for(ll j=i ; j<20 ; j+=i){
				if(a[j])++cnt;
			}
//			debug(i);debug(cnt);
			if(cnt)s.insert(cnt);
		}
	}
	
	if(s.size() == 1 && *s.begin() == 1){
		cout << "pairwise coprime";
	}
	else{
		int g = arr[0];
		for(int i=1 ; i<n&&g!=1 ; ++i)g = __gcd(g, arr[i]);
		
		if(g == 1)cout << "setwise coprime";
		else cout << "not coprime";
	}
}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	cout << fixed << setprecision(10);
	
	int tt=1;
	//cin >> tt;
	
	while(tt--){
		solve();
	}
}
