// 　　＿＿
// 　／　<＠ﾌ
//  ｜(ﾉﾉハ))
//  ﾉ从ﾟヮﾟ从
// 　ﾉ｜ｿﾉГ|つ author:hotarunx
// 〈_ﾉ^^^ヽ|
// 　~~tｧtｧ~
#include <algorithm>
#include <array>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define int long long

constexpr int MAXA = 1000000;

set<int> makePrimes(int n) {
    set<int> res;
    vector<int> pr(n + 1, 1);
    pr[0] = pr[1] = 0;
    for (int p = 2; p < sqrt(n) + 2; p++)
        if (pr[p])
            for (int x = p * 2; x <= n; x += p) pr[x] = 0;
    for (int p = 2; p < n + 1; p++)
        if (pr[p]) res.insert(p);
    return res;
}

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

    int n;
    cin >> n;
    vector<int> a;

    set<int> primes = makePrimes(MAXA);

    a.reserve(n);
    for (int i = 0; i < n; i++) {
        int tmp;
        cin >> tmp;
        if (!primes.count(tmp)) a.push_back(tmp);
    }

    std::sort(a.begin(), a.end());
    const int m_before_erase = a.size();
    a.erase(std::unique(a.begin(), a.end()), a.end());

    const int m = a.size();

    if (m_before_erase != m) {
        cout << "not coprime" << endl;
        return 0;
    }

    bool pairwise_coprime = true;

    for (int i = 0; i < m; i++) {
        for (int j = i + 1; j < m; j++) {
            pairwise_coprime &= gcd(a[i], a[j]);

            if (!pairwise_coprime) break;
        }
        if (!pairwise_coprime) break;
    }

    if (pairwise_coprime) {
        cout << "pairwise coprime" << endl;
        return 0;
    }

    int cumgcd = a[0];
    for (int i = 0; i < m; i++) {
        cumgcd = gcd(a[i], cumgcd);
    }

    if (cumgcd == 1) {
        cout << "setwise coprime" << endl;
        return 0;
    }

    cout << "not coprime" << endl;
}
