#include <bits/stdc++.h>
#define FOR(i, a, n) for(ll i = (ll)a; i < (ll)n; i++)
#define FORR(i, n) for(ll i = (ll)n - 1LL; i >= 0LL; i--)
#define rep(i, n) FOR(i, 0, n)
#define ALL(x) begin(x), end(x)
using namespace std;
using ll = long long;
constexpr ll Mod = 998244353;
constexpr ll mod = 1e9 + 7;
constexpr ll inf = 1LL << 60;
const double PI = acos(-1);
template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) {
    return a < b && (a = b, true);
}
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) {
    return a > b && (a = b, true);
}
/*-------------------------------------------*/

bool b[1000009];

int n;
int a[1000009];

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    vector<ll> p;

    b[0] = b[1] = 1;
    FOR(i, 2, 1000009)
    if(!b[i]) {
        for(int j = i + i; j < 1000009; j += i)
            b[j] = 1;
        p.push_back(i);
    }

    cin >> n;
    int g = 0;
    bool pai = true;
    rep(i, n) {
        cin >> a[i];
        g = gcd(g, a[i]);
        if(pai) {
            bool isp = true;
            for(int j = 0; p[j] * p[j] <= a[i]; j++) {
                if(a[i] % p[j] == 0) {
                    isp = false;
                    if(b[p[j]] || b[a[i] / p[j]]) {
                        pai = false;
                    }
                    b[p[j]] = b[a[i] / p[j]] = 1;
                }
            }
            if(isp) {
                if(b[a[i]]) pai = false;
                b[a[i]] = 1;
            }
        }
    }

    if(pai) {
        cout << "pairwise coprime\n";
        return 0;
    }

    if(g == 1)
        cout << "setwise coprime\n";
    else
        cout << "not coprime\n";

    return 0;
}