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

typedef long long LL;

#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define ALL(x) (x).begin(),(x).end()
const int IINF = 1e9;
const LL LINF = 1e18;
const LL MOD = 1e9+7;

int main() {
    int N;
    cin >> N;
    vector<int> A(N);
    REP(i, N) {
        cin >> A[i];
    }
    int M = -1;
    REP(i, N) {
        M = max(M, A[i]);
    }
    vector<int> E(M + 1, -1);
    FOR(i, 1, M + 1) {
        if(E[i] == -1) {
            E[i] = i;
        }
        for(int j = i*2;j < M + 1;j += i) {
            if(E[j] == -1) {
                E[j] = i;
            }
        }
    }
    vector<bool> primes(M + 1, false);
    bool pairwise = true;
    for(int i = N - 1;0 <= i;i--) {
        int j = A[j];
        for(;1 < j;) {
            pairwise = pairwise && !primes[j];
            primes[j] = true;
            j /= E[j];
        }
    }
    int g = A[0];
    FOR(i, 1, N) {
        g = gcd(g, A[i]);
    }
    bool setwise = g == 1;
    if(pairwise) {
        cout << "pairwise coprime" << endl;
    }else if(setwise) {
        cout << "setwise coprime" << endl;
    }else{
        cout << "not coprime" << endl;
    }
    return 0;
}
