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

#ifdef DEBUG
    #include "debug.h"
    #define dump(...)                                                              \
        DUMPOUT << "  " << string(#__VA_ARGS__) << ": "                            \
                << "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]"        \
                << endl                                                            \
                << "    ",                                                         \
            dump_func(__VA_ARGS__)
#else
    #define dump(...)
#endif


// http://beet-aizu.hatenablog.com/entry/2018/04/08/145516
template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
  return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

template<typename T,typename V>
typename enable_if<is_class<T>::value==0>::type
fill_v(T &t,const V &v){t=v;}

template<typename T,typename V>
typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t,const V &v){
  for(auto &e:t) fill_v(e,v);
}

//////////////////

#define int long long
 
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)

#define YES puts("YES")
#define Yes puts("Yes")
#define NO  puts("NO")
#define No  puts("No")
#define ALL(v) (v).begin(), (v).end()
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }

//*
#define mod 1000000007 /*/
#define mod 998244353 //*/

typedef pair<int, int> P;
#define INF (1LL<<60)

/*
vector<pair<int, int> > prime_factorize(int n) {
    vector<pair<int, int> > res;
    for (int p = 2; p * p <= n; ++p) {
        if (n % p != 0) continue;
        int num = 0;
        while (n % p == 0) { ++num; n /= p; }
        res.push_back(make_pair(p, num));
    }
    if (n != 1) res.push_back(make_pair(n, 1));
    return res;
}
 */

std::vector<int> get_min_prime_fact_table(int n){
    std::vector<int> lp(n + 1,0), P;
    for (int i = 2; i <= n; i++){
        if (lp[i] == 0){
            lp[i] = i;
            P.push_back(i);
        }
        for (int j = 0; j < P.size() && P[j] <= lp[i] && i * P[j] <= n; j++)
            lp[i * P[j]] = P[j];
    }
 
    return lp;
}
 
set<int> prime_factorize(int n, std::vector<int> &lp){

    set<int> v;
    while(n!=1){
        v.insert(lp[n]);
        n /= lp[n];
    }
     
    return v;
}

void solve(){
    int N;
    cin >> N;
    auto lp = get_min_prime_fact_table(1000000LL);

    vector<int> A(N);
    rep(i,N) cin >> A[i];
    
    int g = A[0];
    rep(i,N) g = gcd(g,A[i]);
    
    set<int> s;
    bool found = false;
    rep(i,N){
        auto ps = prime_factorize(A[i], lp);
        dump(A[i],ps);
        for(auto p : ps){
            if(s.find(p)!=s.end()){ dump(p);found=true; break;}
            s.insert(p);
        }
    }
    
    if(!found) cout << "pairwise coprime" << endl;
    else if(g==1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
    
}


signed main(){
    cout << fixed << setprecision(18);
//    cerr << fixed << setprecision(18);
    solve();
}


Measured memory_bytes: 22468