#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <iomanip>
#include <numeric>
#include <queue>
#include <cmath>
using namespace std;

int main() { 
    int n;
    cin >> n;
    vector<int> v(n, 0);
    for (int i = 0; i < n; i++) {
        cin >> v[i];
    }
    if (n >= 500002) {
        cout << "not coprime" << endl;
        return 0;
    }
    vector<int> vv = v;
    sort(v.begin(), v.end());
    for (int i = 1; i < n; i++) {
        if (v[i] == v[i - 1] && v[i] > 1) {
            cout << "not coprime" << endl;
            return 0;
        }
    }
    vector<int> p;
    for (int i = 2; i <= 1000; i++) {
        int flag = 1;
        for (int j = 2; j * j <= i; j++) {
            if (i % j == 0) {
                flag = 0;
                break;
            }
        }
        if (flag == 1) p.push_back(i);
    }
    unordered_map<int, int> um;
    for (auto num : p) {
        for (int i = 0; i < n; i++) {
            int flag = 0;
            while (v[i] % num == 0) {
                flag = 1;
                v[i] /= num;
            }
            um[num] += flag;
        }
    }
    for (int i = 0; i < n; i++) {
        if (v[i] > 1) {
            um[v[i]]++;
        }
    }
    int flag = 1;
    for (auto pp : um) {
        if (pp.second > 1) {
            flag = 0;
            break;
        }
    }
    if (flag == 1) {
        cout << "pairwise coprime" << endl;
        return 0;
    }
    v = vv;
    int g = v[0];
    for (int i = 1; i < n; i++) {
        g = gcd(g, v[i]);
    }
    if (g == 1) {
        cout << "setwise coprime" << endl;
        return 0;
    } else {
        cout << "not coprime" << endl;
    }
}


