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

const ll INF = 1LL << 60;
const ll MOD = ll(1e9)+7;


bool coprime(int a, int b) 
{    
    return (gcd(a, b) == 1); 
} 
  
// Recursive function to 
// return gcd of a and b 
int numOfPairs(vector<ll> vec, int n)  {
    int count = 0;  
    for (int i = 0; i < n - 1; i++) {
        for (int j = i + 1; j < n; j++) {
            if (coprime(vec.at(i), vec.at(j))) count++;
        }
    }
    return count; 
} 


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

    // set<pair<ll, ll>> S;
    vector<ll> A(N);

    for (ll i = 0; i < N; i++) {
        cin >> A.at(i);
    }
    
    string ans;

    ll num = numOfPairs(A, N);
    
    if (num == N) {
        ans = "pairwise coprime";
    } else {
        int r = accumulate(A.begin(), A.end(), 0, [](int m, int n) {
            return gcd(m, n);
        });

        if (r == 1) {
            ans = "setwise coprime";
        } else {
            ans = "not coprime";
        }
    }

    cout << ans << endl;
    
    
    return 0;
}