#include <bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
//using namespace __gnu_pbds;

#define ll  long long
#define PR  pair<int, int>

const int N = 1e6 + 10;
const int MOD = 1e9 + 7;
const long long INF = 5e18;
const double PI = 2 * acos(0.0);
//template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

int cnt[N];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, g = 0;
    cin >> n;
    for (int i = 0; i < n; i++) {
        int x;
        cin >> x;
        g = __gcd(x, g);
        cnt[x]++;
    }
    for (int i = 2; i < N; i++) {
        if (cnt[i] > 1) {
            cout << (g == 1 ? "setwise coprime" : "not coprime") << '\n';
            return 0;
        }
        int tmp = 0;
        for (int j = i + i; j < N; j += i) {
            tmp += (cnt[j] > 0);
        }
        if (tmp > 1) {
            cout << (g == 1 ? "setwise coprime" : "not coprime") << '\n';
            return 0;
        }
    }
    cout << "pairwise coprime" << '\n';
    return 0;
}
