#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <queue>
#include <bitset>
#include <stack>
#include <functional>

#ifdef LOCAL
    #define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
    #define eprintf(...)
#endif

#define rep_(i, a_, b_, a, b, ...) for (int i = (a), i##_len = (b); i < i##_len; ++i)
#define rep(i, ...) rep_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
#define reprev_(i, a_, b_, a, b, ...) for (int i = (b-1), i##_min = (a); i >= i##_min; --i)
#define reprev(i, ...) reprev_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
#define all(x) (x).begin(), (x).end()
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 fls(x) (64 - __builtin_clzll(x))
#define pcnt(x) __builtin_popcountll(x)
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair <int,int> P;
typedef long double ld;

template <class T>
map<T, int> prime_factor(T n) {
    map<T, int> ret;
    for (T i = 2; i * i <= n; i++) {
        while (n % i == 0) {
            ret[i]++;
            n /= i;
        }
    }
    if (n != 1) ret[n] = 1;
    return ret;
}

template <class T>
bool cop (map<T, int> &m1, map<T, int> &m2) {
    if (m1.size() < m2.size()) {
        for (auto [a, b] : m1) if (m2[a] != 0) return false;
    } else {
        for (auto [a, b] : m2) if (m1[a] != 0) return false;
    }
    return true;
}

template <class T>
map<T, int> lcm_prime (map<T, int> &m1, map<T, int> &m2) {
    map<T, int> ret;
    for (auto [a, b] : m1) ret[a] = max(b, m2[a]);
    for (auto [a, b] : m2) ret[a] = max(b, m1[a]);
    return ret;
}


int main (void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n; cin >> n;
    vector<ll> a(n); rep (i, n) cin >> a[i];
    vector<map<ll, int>> f;
    map<ll, int> lc;
    bool bcop = true;
    rep (i, n) {
        f.push_back(prime_factor(a[i]));
        if (!cop(lc, f[i])) {
            bcop = false;
            break;
        }
        lc = lcm_prime(lc, f[i]);
    }
    ll setg = a[0]; rep (i, n) setg = gcd(setg, a[i]);
    bool setw = (setg == 1);
    if (bcop) cout << "pairwise coprime\n";
    else if (setw) cout << "setwise coprime\n";
    else cout << "not coprime\n";
    return 0;
}