#include <bits/stdc++.h>

#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
#pragma ide diagnostic ignored "OCUnusedMacroInspection"
using namespace std;

#define sqr(a) ((a)*(a))
#define forn(i, n) for(int i = 0; i < (int)n; ++i)
#define nrof(i, n) for(int i = (int)n - 1; i >= 0; --i)
#define rep(i, k, n) for(int i = (int)k; i < (int)n; ++i)
#define per(i, k, n) for(int i = (int)k - 1; i >= (int)n; --i)
#define x first
#define y second
#define mp make_pair
#define sz(a) (int)(a.size())
#define pb push_back
#define eb emplace_back
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef double dd;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int N = sqrt(1e6 + 9);
const int M = 2e3 + 9;
const int INFINT = 1e9 + 9;
const ll INFLL = 1e18 + 9;
const ll MOD = (ll) (1000000007);

vector<int> dx = {-1, 0, 1, 0};
vector<int> dy = {0, -1, 0, 1};

void solve() {

    vector<bool> prime(N, true);
    prime[0] = prime[1] = false;
    for (int i = 2; i < N; ++i) {
        if (prime[i]) {
            if (i * 1ll * i < N) {
                for (int j = i * i; j < N; j += i) {
                    prime[j] = false;
                }
            }
        }
    }

    vector<int> prm;
    forn(i, N) if (prime[i]) prm.pb(i);

    int n;
    cin >> n;
    vector<int> a(n);
    forn(i, n) cin >> a[i];
    int g = a[0];
    forn(i, n) {
        g = __gcd(g, a[i]);
    }
    if (g != 1) {
        cout << "not coprime" << endl;
        return;
    }

    unordered_set<int> p;
    forn(i, n) if (a[i] > 1) {
        if (p.count(a[i])) {
            cout << "setwise coprime" << endl;
            return;
        }
        p.insert(a[i]);
    }

    forn(i, sz(prm)) {
        int cnt = 0;
        forn(j, n) {
            if (a[j] % prm[i] == 0) ++cnt;
        }
        if (cnt > 1) {
            cout << "setwise coprime" << endl;
            return;
        }
    }

    cout << "pairwise coprime" << endl;
}

int main() {
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int t = 1;
//    cin >> t;
    while (t--) {
        solve();
    }

    return 0;
}
