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


int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);

    vector<int> prime(100001);
    for (int i = 0; i < 100001; ++i) {
        prime[i] = i;
    }
    prime[0] = -1;
    prime[1] = -1;
    for (int i = 2; i < 100001; ++i) {
        for (int j = i * 2; j < 100001; j += i) {
            prime[j] = min(prime[j], i);
        }
    }

    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }

    vector<bool> appear(100001);
    bool flag = true;
    for (int start : a) {
        int now = start;
        map<int, bool> facts;
        while (prime[now] != -1) {
            facts[prime[now]] = true;
            now /= prime[now];
        }
        for (auto pair : facts) {
            int fact = pair.first;
            if (appear[fact]) {
                flag = false;
                break;
            }
            appear[fact] = true;
        }
    }

    if (flag) {
        cout << "pairwise coprime" << endl;
    } else {
        int res = a[0];
        for (int i = 1; i < n; ++i) {
            res = gcd(res, a[i]);
        }
        if (res == 1) {
            cout << "setwise coprime" << endl;
        } else {
            cout << "not coprime" << endl;
        }
    }


    return 0;
}
