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

std::vector<long long int> enum_div(long long int n) {
    std::vector<long long int> ret;
    for(long long int i=1 ; i*i<=n ; ++i) {
        if(n%i == 0) {
            ret.push_back(i);
            if(i!=1 && i*i!=n) {
                ret.push_back(n/i);
            }
        }
    }
    ret.push_back(n);
    return ret;
}

int main() {
    int n;
    cin >> n;
    int a[n];
    map<int, int> mp;
    for(int j = 0; j < n; ++j) {
        cin >> a[j];

        for(long long int i=1 ; i*i<=a[j]; ++i) {
            if(a[j]%i == 0) {
                mp[i]++;
                if(i!=1 && i*i!=a[j]) {
                    mp[a[j]/i]++;
                }
            }
        }
        mp[a[j]]++;
    }

    int gcd = __gcd(a[0], a[1]);
    for(int i = 2; i < n; ++i) {
        gcd = __gcd(gcd, a[i]);
    }

    if(gcd == 1) {
        auto begin = mp.begin(), end = mp.end();
        for(auto iter = begin; iter != end; iter++) {
            //cerr << iter->first << " " << iter->second << endl;
            if(iter->first != 1 && iter->second >= 2) {
                cout << "setwise coprime" << '\n';
                return 0;
            }
        }
        cout << "pairwise coprime" << '\n';
    } else {
        cout << "not coprime" << '\n';
    }
    
}
