#include <bits/stdc++.h>
#include <iostream>

using namespace std;

typedef long long ll;


int main() {
    ll N;
    cin >> N;

    ll A[1000000+1];
    ll g1;
    for (ll i = 1; i <= N; i++) {
        cin >> A[i];
        if (i == 1) {
            g1 = A[i];
        } else {
            g1 = __gcd(g1, A[i]);
        }
    }

    for (ll i = 1; i <= N-1; i++) {
        for (ll j = i+1; j <= N; j++) {
            if (__gcd(A[i], A[j]) != 1)  {
                if (g1 == 1) {
                    cout << "setwise coprime\n";
                    return 0;
                } else {
                    cout << "not coprime\n";
                    return 0;
                }               
            }
        }
    }

    cout << "pairwise coprime\n";
}