#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define int long long
#define endl "\n"
using namespace std;

const int N = 1e6 + 5;
int arr[N];
map<int, int>factors;
bool f;
void trial_division1(long long n) {
    for (long long d = 2; d * d <= n; d++) {
         f = false;
        while (n % d == 0) {
            n /= d;
            f = true;
        }
        if(f)
            factors[d]++;
    }
    if (n > 1)
        factors[n]++;
}
int32_t main() {

    fast
    int n;
    cin >> n;
    cin >> arr[0];
    int gcd = arr[0];
    trial_division1(arr[0]);
    for(int i = 1; i < n; i++) {
        cin >> arr[i];
        gcd = __gcd(arr[i], gcd);
        trial_division1(arr[i]);
    }
    bool flag = true;
    for(auto i : factors) {
        if(i.second >= 2) {
            // cout << i.second << " ** ";
            flag = false;
            break;
        }
    }
    if(gcd == 1 && flag) {
        cout << "pairwise coprime";
    } else if(gcd == 1 && !flag) {
        cout << "setwise coprime";
    } else {
        cout << "not coprime";
    }







    return 0;
}

