#include <bits/stdc++.h>
using namespace std;
#define REP(i,x,n) for(int i=x;i<(int)n;i++)
#define rep(i,n) REP(i,0,n)
#define sp(p) cout<<setprecision(16)<<fixed<<p<<endl;
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(rall(a))
#define UNIQ(a) unique(all(a))
#define UNIQNUM(a) UNIQ(a)-a.begin()
#define UNIQIT(a) a.erase(UNIQ(a), a.end());
#define VOUT(v,i) rep(i,v.size())cout<<v[i]<<(i==v.size()-1?"\n":" ");
#define vout(v) VOUT(v,z);
#define vdbg(v,i) cout<<#v<<": ";for(int i=0;i<(int)v.size();i++){cout<<v[i]<<" ";}cout<<"\n";
#define vmin(v) *min_element(all(v))
#define vmax(v) *max_element(all(v))
#define vsum(v) accumulate(all(v), 0LL)
#define MOUT(m,r,c) rep(i,r){rep(j,c){cout<<m[i][j]<<" ";}cout<<endl;}
#define mout(m) MOUT(m,m.size(),m[0].size())
#define debg(a) cout<<#a<<": "<<a<<endl;
#define out(a) debg(a)
#define show(a) for(cont &y:a){for(cont &x:y){cout<<x<<" ";}cout<<endl;}
#define digit(a) to_string(a).length();
// template<class T>inline int out(const T &t){ print(t); putchar('\n'); return 0; }
// template<class T>inline T gcd(T a,T b){if(b==0)return a; return(gcd(b,a%b));}
// template<class T>inline T lcm(T a,T b){return a/gcd(a,b)*b;}
bool is_palindrome(string s){return s == string(s.rbegin(),s.rend());}
#define popcount __builtin_popcount
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef vector<ll> V;
typedef vector<vector<ll>> VV;
// const long long MOD=1000000007;
const long long INF = 1e18;
#define EPS (1e-7)
#define PI (acos(-1))
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) { a = b; return true; }
    return false;
}
template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) { a = b; return true; }
    return false;
}

std::vector<int> Eratosthenes( const int N ) {
    std::vector<bool> is_prime( N + 1 );
    for( int i = 0; i <= N; i++ ) {
        is_prime[ i ] = true;
    }
    std::vector<int> P;
    for( int i = 2; i <= N; i++ ) {
        if( is_prime[ i ] ) {
            for( int j = 2 * i; j <= N; j += i ) {
                is_prime[ j ] = false;
            }
            P.emplace_back( i );
        }
    }
    return P;
}

vector<int> sieve(int n){
    vector<int> v(n);
    for (int i = 2; i < v.size(); i++) {
        if (v[i] == 0) {
            for (int j = i; j < v.size(); j += i){
                v[j] = i;
            }
        }
    }
    return v;
}

vector<vector<int>> fast_prime_factor(int n){
    vector<int> vst(n);
    vector<vector<int>> vec(n);
    for (int i = 2; i <= n; i++) {
        if (vst[i])
            continue;
        for (int j = i; j <= n; j += i)
            vec[j].push_back(i), vst[j] = 1;
    }
    return vec;
}

int main(){
    long long N;
    scanf("%lld",&N);
    std::vector<long long> A(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&A[i]);
    }
    
    // vector<int> v;
    // v = Eratosthenes(1e5);
    // string s = "pairwise coprime";
    // for (long long i = 0; i < v.size(); i++) {
    //     ll cnt=0;
    //     for (long long j = 0; j < N; j++) {
    //         if(A[j]%v[i]==0) cnt++;
    //     }
    //     if(cnt==N){
    //         s = "not coprime";
    //         break;
    //     }else if(1 < cnt && cnt<N){
    //         s = "setwise coprime";
    //         break;
    //     }
    // }
    // cout << s << endl;

    ll g=A[0];
    for (long long i = 1; i < N; i++) {
        g=gcd(g, A[i]);
    }
    // out(g);
    if(g>1){
        cout << "not coprime" << endl;
        return 0;
    }
    // vector<int> v = sieve(1000000);
    vector<vector<int>> v = fast_prime_factor(1000000);
    vector<int> cnt(1000000);
    for (long long i = 0; i < N; i++) {
        for (auto& e: v[A[i]]) {
            cnt[e]++;
            if(cnt[e]>1){
                cout << "setwise coprime" << endl;
                return 0;
            }
        }
    }
    cout << "pairwise coprime" << endl;

    return 0;
}


Measured memory_bytes: 70236