//
// Created by PIIMUU on 8/29/2020.
//
#include <bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    int n;
    cin >> n;
    /*
    vector<bool> prime(1e6 + 10, true);
    prime[1] = false;
    for (int i = 2; i * i <= 1e6; i++) {
        if (prime[i] == true) {
            for (int j = i + i; j <= 1e6; j += i) {
                prime[j] = false;
            }
        }
    }
    */
    int gcd = 0;
    vector<int> cnt(1e6 + 10), a(n + 1);
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
        gcd = __gcd(gcd, a[i]);
        for (int j = 1; j * j <= a[i]; j++) {
            if (a[i] % j == 0) {
                if (j != 1) {
                    cnt[j]++;
                }
                if (a[i] / j != j) {
                    cnt[a[i] / j]++;
                }
            }
        }
    }
    bool yes = true;
    for (int i = 1; i <= 1e6; i++) {
        if (cnt[i] > 1) {
            yes = false;
        }
    }
    if (yes == true) {
        cout << "pairwise coprime";
        return 0;
    }
    if (gcd == 1) {
        cout << "setwise coprime";
        return 0;
    }
    cout << "not coprime";

}

