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

using ll = long long;
using pi = pair<int, int>;

const int maxn = 1e3 + 5;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    vector<bool> is_prime(maxn, true);
    is_prime[0] = is_prime[1] = false;
    for (int i = 2; i <= maxn; i++) {
        if (is_prime[i] && (ll)i * i <= maxn) {
            for (int j = i * i; j <= maxn; j += i)
                is_prime[j] = false;
        }
    }

    vector<int> primes;
    for(int i=2; i <= maxn; i++) {
        if(is_prime[i]) primes.push_back(i);
    }

    vector<bool> found(maxn, false);
    int n, all = 0, flag = 1;
    cin >> n;
    for(int i=0; i<n; i++) {
        int num;
        cin >> num;
        if(all == 0) all = num;
        else all = __gcd(all, num);
        for (int p : primes) {
            if (p * p > num)
                break;
            int count = 0;
            while (num % p == 0) {
                count++;
                num /= p;
            }
            if(count > 0) {
                if(found[p]) flag = 0;
                else found[p] = true;
                // cout << p << " ";
            }
        }
        if (num > 1) {
            if(found[num]) flag = 0;
            else found[num] = true;
        }
        // cout << all << " " << flag << endl;
    }

    if(flag == 1) cout << "pairwise coprime" << endl;
    else if(all == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;

    return 0;
}