
// Problem: E - Coprime
// Contest: AtCoder - AtCoder Beginner Contest 177
// URL: https://atcoder.jp/contests/abc177/tasks/abc177_e
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

#define int long long
#define endl "\n"
#define deb(x) cout << #x << " -> " << x << endl;
#define print(x)                         \
    for (auto x_ : x) cout << x_ << " "; \
    cout << endl;
#define pb push_back
#define all(x) x.begin(), x.end()
#define mod 1000000007  // 1e9 + 7
#define prec(x, y) fixed << setprecision(y) << x

const int N = (int)1e6 + 3;
bool visited[N] = {};

void solve() {
    int n;
    cin >> n;
    int e_count, o_count;
    e_count = o_count = 0;
    int a[n];
    for (auto &x : a) {
        cin >> x;
        if (x & 1)
            o_count++;
        else
            e_count++;
    }

    bool okay = true;

    for (int i = 0; i < n; ++i) {
        for (int k = 1; k * k <= a[i]; ++k) {
            if (n % k == 0) {
                int factor1 = a[i] / k;
                int factor2 = k;

                if (factor1 != 1 && visited[factor1]) {
                    okay = false;
                    break;
                }

                if (factor2 != 1 && visited[factor2]) {
                    okay = false;
                    break;
                }

                else {
                    visited[factor1] = true;
                    visited[factor2] = true;
                }
            }
        }
    }

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

    int total_gcd = __gcd(a[0], a[1]);
    for (int i = 2; i < n; ++i) total_gcd = __gcd(total_gcd, a[i]);

    if (total_gcd == 1) {
        cout << "setwise coprime\n";
        return;
    }

    cout << "not coprime\n";
    return;
}

int32_t main() {
    ios::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);

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