#ifdef LOCAL
#include "libs/debug/print_list.hpp"
#define debug(x) (cout << # x ": " << x << endl)
#define dev(v, m, n) for(int i=0;i<n;++i){for(int j=0;j<m;++j){cout<<"|"<<v[j][i];}cout<<"|"<<endl;}
#else
#define debug(x) ;
#define dev(v, m, n) ;
#endif

// :----------------------------------------

#include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <numeric>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define int long long int
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(x) (x).begin(), (x).end()
#define capi(x) int x;cin>>x
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

using vi = vector<int>;
using pi = pair<int, int>;
using vp = vector<pi>;
using Graph = vector<vector<int>>;

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(b<a){a=b;return 1;}return 0;}

#define P (1'000'000'007)

class UnionFind {
public:
    UnionFind(int n) {
        for (int i = 0; i < n; i++) {
            _parent.push_back(i);
            _size.push_back(1);
        }
    }

    int find(int index) {
        if (is_root(index)) return index;
        return _parent[index] = find(_parent[index]);
    }

    bool is_root(int index) {
        return _parent[index] == index;
    }

    bool has_same_root(int lhs, int rhs) {
        return find(lhs) == find(rhs);
    }

    void unite(int lhs, int rhs) {
        int l = find(lhs);
        int r = find(rhs);
        if (has_same_root(l, r)) return;
        _size[l] += _size[r];
        _parent[r] = l;
    }

    int size(int index) {
        return _size[find(index)];
    }

private:
    vector<int> _parent;
    vector<int> _size;
};

bool flag[1000010];

signed main() {
    int n;
    cin >> n;

    memset(flag, false, sizeof(bool) * 1000010);
    vi va;
    bool is_pairwise = true;

    rep(i, n) {
        capi(a);
        va.push_back(a);

        if (flag[a]) {
                    debug(a);
            is_pairwise = false;
        }

        if(!is_pairwise) continue;
        for (int p = 2; p <= sqrt(a) + 1; ++p) {
            if (a % p == 0 && a > 1) {
                if (flag[p]) {
                    is_pairwise = false;
                    break;
                } else {
                    flag[p] = true;
                }
            }
            while (a % p == 0 && a > 1) {
                if (flag[a]) {
                    debug(a);
                    is_pairwise = false;
                    break;
                } else {
                    flag[a] = true;
                    a /= p;
                }
            }

            if(!is_pairwise) break;
        }

        if (a > 1) {
            if (flag[a]) {
                debug(a);
                is_pairwise = false;
            } else {
                flag[a] = true;
            }
        }
    }

    if (is_pairwise) {
        cout << "pairwise coprime";
        return 0;
    }

    int g = va[0];

    rep(i, n - 1) {
        g = gcd(g, va[i + 1]);
    }

    if (g == 1) {
        cout << "setwise coprime";
    } else {
        cout << "not coprime";
    }
    
    return 0;
}
