#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <algorithm>
#include <cstdio>
#include <iomanip>
#include <queue>
#include <deque>
#include <stack>
#include <fstream>
#include <cmath>
#include <random>
#include <complex>
#include <functional>
#include <bitset>
#include <sstream>
#include <cassert>
#include <time.h>

#define ll int64_t
#define Rep(i, n) for (ll i = 0; i < n; i++)
using namespace std;
typedef vector<ll> vec;
typedef vector<vec> mat;

const ll inf = 1LL << 60;

template<class T> inline void chmin(T& a, T b) {
    if (a > b) {
        a = b;
    }
}
template<class T> inline void chmax(T& a, T b) {
    if (a < b) {
        a = b;
    }
}
void printvec (vec &v) {
    Rep (i, (ll)v.size()) {
        cout << v[i] << " \n"[i+1 == (ll)v.size()];
    }
}

vec eratosthenes(ll n) {
    vector<bool> sieve(n+1, true);
    vector<ll> table;
    sieve[0] = sieve[1] = false;
    for (ll i = 2; i <= n; i++) {
        if (sieve[i]) {
            table.push_back(i);
            for (ll j = 2; i * j <= n; j++) {
                sieve[i * j] = false;
            }
        }
    }

    return table;
}

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

    ll N;
    cin >> N;
    vec A(N);
    ll check = 0;
    Rep (i, N) {
        cin >> A[i];
        check = gcd(check, A[i]);
    }

    if (check != 1) {
        cout << "not coprime\n";
        return 0;
    }

    auto primes = eratosthenes(1e6+10);
    ll primenum = primes.size();
    vector<bool> used(primenum, false);

    Rep (i, N) {
        Rep (j, primenum) {
            if (A[i] % primes[j] == 0 and used[j]) {
                // cout << A[i] << " " << primes[j] << "\n";
                cout << "setwise coprime\n";
                return 0;
            } else if (A[i] % primes[j] == 0) {
                used[j] = true;
            }
        }
    }

    cout << "pairwise coprime\n";
}