#include <iostream>
#include <string>
#include <vector>
#include <algorithm> 
#include <utility> 
#include <tuple> 
#include <cstdint> 
#include <cstdio> 
#include <map> 
#include <queue> 
#include <set> 
#include <stack> 
#include <deque> 
#include <unordered_map> 
#include <unordered_set> 
#include <bitset> 
#include <cctype> 
#include <cmath>
#include <iomanip>
#include <ctype.h>

using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi >;
using vl = vector<ll>;
using vvl = vector<vl >;
using pairi = pair<int, int>;
using pairl = pair<ll, ll>;

#define TR ","
#define TS " "
#define rep(i,N) for(ll i=0;i<(ll)N;++i)
#define rpt(i,a,b) for(int i=a;i<(int)b;++i)
#define all(v) v.begin(), v.end()
#define IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)

ll gcd(int a, int b) {
    if (a < b) swap(a, b);
    if (b == 0) return a;
    return gcd(b, a % b);
}

ll lcm(ll x, ll y) {
    return x / gcd(x, y) * y;
}

void printVector(const vector<ll>& vec) {
    for (ll value : vec) {
        cout << value << " ";
    }
    cout << endl;
}

vector<int> IntegerToVector(int bit, int N) {
    vector<int> S;
    for (int i = 0; i < N; ++i) {
        if (bit & (1 << i)) {
            S.push_back(i);
        }
    }
    return S;
}

int main()
{
    ll N; cin >> N;
    vl A(N);
    rep(i, N) cin>>A[i];

    sort(all(A));

    vl p;

    p.push_back(2);
    for (ll n = 3; n <= sqrt(A[N-1]); ++n) {
        for (ll k = 0; k != p.size(); ++k) {
            if (n % p[k] == 0) { goto xyz; }
            if (p[k] > sqrt(n)) { break; }
        }
        p.push_back(n);
    xyz:;
    }

    ll jj, kk = 0, ll = 0;

    rep(i, p.size()) {
        jj = 0;
        rep(j, N) {
            if (A[j] % p[i] == 0) {
                ++jj;
            }
        }
        if (jj == N) {
            ++kk;
        }
        else if (jj>=2){
            ++ll;
        }
    }
    if (kk > 0) { cout << "not coprime" << endl; }
    else if (kk == 0 & ll > 0) { cout << "setwise coprime" << endl; }
    else { cout << "pairwise coprime" << endl; }

}