#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); ++i)
using namespace std;

string res(int n) {
    if(n == 0) return "pairwise coprime";
    else if(n == 1) return "setwise coprime";
    else return "not coprime";
}

const int M = 20 + 5;

int main() {
    int N; cin >> N;
    vector<int64_t> A(N);
    for(auto &e : A) cin >> e;

    int64_t G = 0;
    rep(i, N) G = gcd(G, A[i]);
    if(G != 1) {
        cout << res(2) << '\n';
        return 0;
    }

    vector<int> smallestDivisor(M);
    smallestDivisor[1] = 1;
    for(int i = M - 1; i >= 2; --i) {
        smallestDivisor[i] = i;
        for(int j = i; j < M; j += i) {
            smallestDivisor[j] = i;
        }
    }

    map<int64_t, int> prime;

    for(auto a : A) {
        int x = a;
        while(smallestDivisor[x] != 1) {
            if(prime[smallestDivisor[x]]) {
                cout << res(1) << '\n';
                return 0;
            }
            x = x / smallestDivisor[x];
        }
        x = a;
        while(smallestDivisor[x] != 1) {
            prime[smallestDivisor[x]]++;
            x = x / smallestDivisor[x];
        }
    }

    cout << res(0) << '\n';
    return 0;
}
