#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define sz(v) (int)v.size() 
#define all(v) v.begin(), v.end()
void dbg_out() { cerr << "\b\b]\n"; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T){ cerr << H << ", "; dbg_out(T...);}
#define watch(...) cerr << "[" << #__VA_ARGS__ << "]: [", dbg_out(__VA_ARGS__)


/****************************** CODE IS HERE ***********************************/

const int N = 1e6 + 9;

int main(){
    ios_base::sync_with_stdio(false); cin.tie(nullptr);

    int n; cin >> n;
    vector <int> A(N, 0);
    int gcd = 0;
    for (int i = 0, u; i < n; ++i) {
        cin >> u;
        A[u]++;
        gcd = __gcd(gcd, u);
    }

    bool ok = true;
    vector <int> primes(N, 0);
    for (int i = 2; i < N; ++i) {
        for (int j = i; j < N; j += i) {
            if (A[j] == 0) continue;
            if (A[j] > 1) ok = false;
            if (!primes[j]) primes[j] = i;
            else ok = false;
        }
    }

    if (ok) cout << "pairwise coprime";
    else if (gcd == 1) cout << "setwise coprime";
    else cout << "not coprime";


    return 0;
}

