#include <bits/stdc++.h>
#define ll long long
#define ld long double 
#define For(i, a, n) for(long long i = a; (a < n) ? (i < n) : (i > n); (a < n) ? (i++) : (i--))
#define mod 1000000007
#define pb push_back
#define fio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
 
using namespace std;
const int N = 10000000;
int lp[N+1];
int main() {
    fio;
	vector<int> pr;
	for (int i=2; i<=N; ++i) {
    	if (lp[i] == 0) {
        	lp[i] = i;
        	pr.push_back(i);
    	}
    	for (int j=0; j<(int)pr.size() && pr[j]<=lp[i] && i*pr[j]<=N; ++j)
        	lp[i * pr[j]] = pr[j];
	}
    int n;
    cin >> n;
    int a[n];
    int gdc = 1;
    set<ll> s;
    For(i, 0, n) {
        cin >> a[i];
        gdc = __gcd(gdc, a[i]);
        s.insert(lp[a[i]]);
    }
    if(s.size() == n)
    	cout << "pairwise coprime";
    else if(s.size() < n && gdc == 1)
    	cout << "setwise coprime";
    else
    	cout << "not coprime";
}