#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <queue>
#include <cmath>
#include <numeric>
#include <utility>
#include <iomanip>

using namespace std;
using int64 = long long;

struct aaa{aaa(){cin.tie(nullptr); ios::sync_with_stdio(false); cout<<fixed<<setprecision(20);};}aaa;

vector<int> pf(int n) {
    vector<int> primes;
    if (n%2 == 0) {
        primes.push_back(2);
        while (n%2 == 0) n /= 2;
    }
    for (int i=3; i*i<=n; i+=2) {
        if (n%i) continue;
        primes.push_back(i);
        while (n%i == 0) n /= i;
    }
    if (n != 1) primes.push_back(n);

    return primes;
}

int main() {
    const int MAX_N = 1e6;
    vector<int> sieve(MAX_N+1);
    iota(sieve.begin(), sieve.end(), 0);
    for (int i=2; i<=MAX_N; i++) {
        if (i != sieve[i]) continue;
        for (int j=i+i; j<=MAX_N; j+=i)
            sieve[j] = i;
    }

    int n;
    cin >> n;
    int all_gcd;
    bool pc = true;
    unordered_map<int, bool> check, pre;
    for (int i=0; i<n; i++) {
        int a;
        cin >> a;
        all_gcd = (i==0)? a : gcd(all_gcd, a);

        if (!pc) continue;
        while (a != 1) {
            if (pre[sieve[a]])
                pc = false;
            check[sieve[a]] = true;
            a /= sieve[a];
        }
        pre = check;
    }

    if (pc)
        cout << "pairwise coprime" << endl;
    else if (all_gcd == 1)
        cout << "setwise coprime" << endl;
    else
        cout << "not coprime" << endl;
}
