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

int main() {
    int N;
    cin >> N;
    vector<int> A(N);
    int setwise;
    bool pairwise = true;
    for(int i = 0; i < N; i++) {
        cin >> A[i];
        setwise = __gcd((i > 0 ? setwise : A[0]), A[i]);
        if(pairwise) {
            for (int j = 0; j < i; j++) {
                if (__gcd(A[j], A[i]) != 1) {
                    pairwise = false;
                };
            }
        }
    }
    if(pairwise)
        cout << "pairwise coprime" << endl;
    else if(setwise == 1)
        cout << "setwise coprime" << endl;
    else
        cout << "not coprime" << endl;
    return 0;
}