#include <iostream>
#include <array>
#include <vector>
#include <string>
#include <numeric>

using namespace std;

#define rep(i, l, n) for(int i = l; i < n; i++)

int main() {
    int n, a, g = 0;
    bool f = true;
    cin >> n;

    int lim = 1000000;

    vector<bool> exist(lim, false);

    rep(i, 0, n) {
        cin >> a;

        if (a % 2 == 0) {
            exist[2] ? f = false : exist[2] = true;
        }

        if (f) {
            for(int j = 3; j * j < a; j += 2) {
                if (a % j != 0) continue;

                if (exist[j]) {
                    f = false;
                    break;
                } else {
                    exist[j] = true;
                }
            }
        }

        g == 0 ? g = a : g = gcd(g, a);
    }

    if (f) {
        cout << "pairwise coprime" << endl;
    } else if (g == 1) {
        cout << "setwise coprime" << endl;
    } else {
        cout << "not coprime" << endl;
    }
}