#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>

using namespace std;

const int dx[4] = { 1,0,-1,0 };
const int dy[4] = { 0,-1,0,1 };
const int LIT = 1e9 + 7;
int n, m;

vector<int> arr[1000001];
vector<int> cnt(1000001, 0);

void solve() {
    cin >> n;
    for (int i = 1; i <= n; i++) {
        int x;
        cin >> x;
        for (int j = 1; j <= (int)sqrt(x); j++) {
            if (x % j == 0) {
                arr[i].push_back(j);
                arr[i].push_back(x / j);
                cnt[j]++;
                if(j != (x/j))
                    cnt[x / j]++;
            }
        }
    }

    bool check = false, Check = true;

    int big = 0, idx =0 ;

    for (int i = 2; i <= n; i++) {
        if (cnt[i] < big) {
            big = cnt[i];
            idx = i;
        }
        if (cnt[i] == n) check = true;
        else if (cnt[i] > 1) Check = false;
    }

    if (check) cout << "not coprime";
    else if (Check) cout << "pairwise coprime";
    else cout << "setwise coprime";

}

int main() {
    cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false);
    solve();
    return 0;
}
