#include <bits/stdc++.h>
using namespace std;
#define rep2(i,m,n) for (int i = (m); i < (n); ++i)
#define rep(i,n) rep2(i,0,n)
#define debug(x) cout << x << endl
typedef long long int ll;
typedef long double ld;
typedef pair<int, int> P;
template<typename T> struct V : vector<T> { using vector<T>::vector; };
V() -> V<int>;
V(size_t) -> V<int>;
template<typename T> V(size_t, T) -> V<T>;
template<typename T> vector<T> make_vec(size_t n, T a) { return vector<T>(n, a); }
template<typename... Ts> auto make_vec(size_t n, Ts... ts) { return vector<decltype(make_vec(ts...))>(n, make_vec(ts...)); }
template<typename T> ostream &operator<<(ostream &os, const vector<T> &v) { for (auto &e : v) os << e << ' '; return os; }
struct fast_ios { fast_ios(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;
template<typename T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; }
template<typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; }
const int INF = 1<<30;
const ll LINF = 1LL<<61;
const ll MOD = 1000000007;
const int M = 1010101;

int main()
{
    int n;
    cin >> n;
    vector<ll> a(n);
    rep(i,n) cin >> a[i];
    vector<int> sieve(M, 0);
    rep(i,n)
    {
        sieve[a[i]]++;
    }
    bool is_cop = true;
    for(int i = 2; i*i < M; i++)
    {
        int cnt = 0;
        for(int j = i; j < M; j += i)
        {
            cnt += sieve[j];
        }
        // cout << cnt << endl;
        if(cnt > 1)
        {
            is_cop = false;
            break;
        }
    }

    bool is_setcop = false;
    // ll gg = 0;
    // rep(i,n) gg = gcd(gg, a[i]);
    // if(gg == 1) is_setcop = true;
    
    if(is_cop)
    {
        cout << "pairwise coprime" << endl;
    }
    else if(is_setcop)
    {
        cout << "setwise coprime" << endl;
    }
    else
    {
        cout << "not coprime" << endl;
    }
    

}