#include <bits/stdc++.h>
using namespace std;

map<int, int> prime_factors(int n) {
    map<int, int> res;
    if(n == 1) { // n=1 の素因数分解は n^1
        res[n] = 1;
        return res;
    }
    for(int i = 2, _n = n; i*i <= _n; ++i) {
        while(n % i == 0) {
            ++res[i]; // 素数i^{res[i]}
            n /= i;
        }
    }
    if(n != 1) res[n] = 1;
    return res;
}
 
int main(){
    int N;
    cin >> N;
    int A[N], g, d[1000000 + 1] = {};
    bool pc = true;
    for(int i=0;i<N;i++){
        cin >> A[i];
        if(i == 0)
            g = A[i];
        g = gcd(g, A[i]);
        map<int, int> res = prime_factors(A[i]);
        for(map<int, int>::iterator it = res.begin(), end = res.end(); it != end; ++it) {
            //cout << it->first << endl;
            if(d[it->first] > 0){
                pc = false;
                break;
            }else{
                d[it->first]++;
            }
        }
    }
        
    // pairwise coprime
    /*
    if(g == 1){
        for(int i=0;i<N;i++){
            // 1 <= i < j <= N
            for(int j=i+1;j<N;j++){
                if(gcd(A[i], A[j]) != 1)
                    pc = false;
                    break;
            }
        }        
    }else{
        pc = false;
    }
    */
    if(pc){
        cout << "pairwise coprime" << endl;
    }else if(g == 1){
        cout << "setwise coprime" << endl;
    }else{
        cout << "not coprime" << endl;
    }

}