#include "bits/stdc++.h"

#define ll long long int
#define ld long double
#define fastIO ios_base::sync_with_stdio(false); cin.tie(nullptr)
#define pb push_back

using namespace std;
typedef pair<int, int> pii;

bool hasGCD[1000001] = {false};

bool decompose(int n) {
    bool found = true;
    while (n > 1) {
        for (int i = 2; i <= n; i++) {
            if (n % i == 0) {
                if (hasGCD[i]) found = false;
                hasGCD[i] = true;
                while (n % i == 0) n /= i;
            }
        }
    }
    return found;
}

int main() {
    fastIO;
    int n;
    cin >> n;
    int a[n];
    for (int &i : a) cin >> i;

    bool isPairwise = true;
    for (int i = 0; i < n; i++) {
        isPairwise = isPairwise && decompose(a[i]);
    }
    if (isPairwise) {
        cout << "pairwise coprime";
        return 0;
    }

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


}
