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

const int L = 1e6 + 1;
vector<bool> p(L);
vector<int> g(L);

void solve() {
    // INPUT
    int n; cin >> n;
    set<int> st;
    bool pairwise = true;
    int cp = 0;
    for (int i = 0; i < n; ++i) { 
        int a;
        cin >> a;
        if (st.count(a)) pairwise = false;
        st.insert(a);
        cp = __gcd(cp, a);
    }

    // LOGIC
    for (int i = 2; i <= L; i++) {
        int tmp = 0;
        for (int j = i; j <= L; j += i) {
            tmp += st.count(j);
        }
        if (tmp > 1 || !pairwise) {
            pairwise = false;
            break;
        }
    }

    if (pairwise) cout << "pairwise coprime\n";
    else if (cp == 1) cout << "setwise coprime\n";
    else cout << "not coprime\n";
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int t = 1;
    while(t--) {
        solve();
    }
}
