
/*
	*	Created By: 'Present_Sir'
	*	Created On: Saturday 29 August 2020 06:09:03 PM IST
*/

#include<bits/stdc++.h>
#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL)
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define sz(v) ((int)v.size())
#define lgt(s) ((int)s.length())
#define int long long
using namespace std;

const int N = 1e6+5;

map< int, int > factors;
bool factorisation(int n) {
	if (n % 2 == 0) {
        if(factors.count(2)){
            return false;
        }
        factors[2]++;
        while(n!=1 and n%2 == 0) n /= 2;
	}
	for (int i = 3; i * i <= n; i += 2) {
		if (n % i == 0) {
			while (n!=1 and n % i == 0) {
				n /= i;
			}
		    if(factors.count(i)){
                return false;
            }
            factors[i]++;
        }
	}
	if (n > 1) {
        if(factors.count(n)){
            return false;
        }
		factors[n]++;
	}
    return true;
}

class Solver{
    public:
        void test(){
            //int t; cin>>t; for(int i=1; i<=t; ++i)
            {
                //cout<<"Case #"<<i<<": ";
                this->solve();
            }
        }
        void solve(){
            int n;
            cin>>n;
            vector < int > v(n);
            set < int > s;
            for(int i=0; i<n; ++i){
                cin>>v[i];
                s.insert(v[i]);
            }
            if((int)s.size() == (int)v.size()){
                bool ok = true;
                for(auto x: s){
                    if(!factorisation(x)){
                        ok = false;
                        break;
                    }
                }
                if(ok){
                    cout<<"pairwise coprime"<<endl;
                    return;
                }
            }
            int gc = v[0];
            for(int i=1; i<n; ++i){
                gc = __gcd(gc,v[i]);
            }
            if(gc == 1){
                cout<<"setwise coprime"<<endl;
                return;
            }
            cout<<"not coprime"<<endl;
        }
};


int32_t main(){
    IOS;
    Solver S;
    S.test();
    return 0;
}

