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

typedef long long ll;
typedef pair<int,int> P;

#define p_ary(ary,a,b) do { cout << "["; for (int count = (a);count < (b);++count) cout << ary[count] << ((b)-1 == count ? "" : ", "); cout << "]\n"; } while(0)
#define p_map(map,it) do {cout << "{";for (auto (it) = map.begin();;++(it)) {if ((it) == map.end()) {cout << "}\n";break;}else cout << "" << (it)->first << "=>" << (it)->second << ", ";}}while(0)

template<typename T1,typename T2>ostream& operator<<(ostream& os,const pair<T1,T2>& a) {os << "(" << a.first << ", " << a.second << ")";return os;}

const char newl = '\n';

int const MAX_N = 1000010;
vector<long long> prime;
vector<bool> is_prime(MAX_N,true);
void Eratosthenes() {
    is_prime[0] = is_prime[1] = false;
    for (long long i = 2;i*i < MAX_N;++i) if (is_prime[i]) for (long long j = 2*i;j < MAX_N;j += i) is_prime[j] = false;
    for (long long i = 0;i < MAX_N;++i) if (is_prime[i]) prime.push_back(i);
}

vector<pair<long long,int>> prime_factorization(long long a) {
    vector<pair<long long,int>> prime_factor;
    if (is_prime[0]) Eratosthenes();
    for (long long& i : prime) {
        if (i*i > a) break;
        if (a%i == 0) {
            pair<long long,long long> p = make_pair(i,0);
            while (a%i == 0) {
                a /= i;
                p.second++;
            }
            prime_factor.push_back(p);
        }
    }
    if (a != 1) prime_factor.push_back(make_pair(a,1));
    return prime_factor;
}

void rec(vector<long long>& div,vector<pair<long long,int>>& fact,int i,long long d) {
    if (i == fact.size()) {
        div.push_back(d);
        return;
    }
    for (int j = 0;j <= fact[i].second;++j) {
        rec(div,fact,i+1,d);
        d *= fact[i].first;
    }
}

// unsorted
vector<long long> divisor(long long a) {
    vector<long long> div;
    vector<pair<long long,int>> prime_factor = prime_factorization(a);
    rec(div,prime_factor,0,1);
    return div;
}

int main() {
    Eratosthenes();
    int n,g = 0;
    cin >> n;
    vector<int> cnt(1000010,0);
    for (int i = 0;i < n;++i) {
        int a;scanf("%d",&a);
        g = gcd(a,g);
        for (ll p : prime) {
            if (p*p > a) break;
            if (a%p) continue;
            cnt[p]++;
            while (a%p == 0) a /= p;
        }
    }
    bool f = true;
    for (int i = 0;i < 1000010;++i) if (cnt[i] > 1) f = false;
    if (f) cout << "pairwise coprime" << newl;
    else if (g == 1) cout << "setwise coprime" << newl;
    else cout << "not coprime" << newl;
}