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

#define rep(i,n) for(i = 0;i < n;++i)
#define all(v) v.begin(), v.end()
using ll = long long;

int main()
{
    cin.tie(0); ios::sync_with_stdio(false);
    int i,j;
    int max_number = 1e6;
    vector<int> era(max_number+1, 0);
    for(i = 2;i <= sqrt(max_number);++i){
        if(!era.at(i)){
            for(j = 2*i;j <= max_number;j += i){
                if(!era.at(j)) era.at(j) = i;
            }
        }
    }
    int n;
    cin >> n;
    vector<int> a(n);
    cin >> a.at(0);
    int tmp = a.at(0);
    for(i = 1;i < n;++i){
        cin >> a.at(i);
        tmp = gcd(tmp, a.at(i));
    }
    if(tmp != 1){
        cout << "not coprime" << endl;
        return 0;
    }
    vector<bool> v(1e6+1, false);
    rep(i,n){
        if(era.at(a.at(i)) == 0){
            if(v.at(a.at(i))){
                cout << "setwise coprime" << endl;
                return 0;
            }else v.at(a.at(i)) = true;
        }else{
            for(j = era.at(a.at(i));j <= sqrt(a.at(i));++j){
                if(a.at(i) == 1) break;
                if(a.at(i)%j == 0){
                    if(v.at(j)){
                        cout << "setwise coprime" << endl;
                        return 0;
                    }else{
                        v.at(j) = true;
                        while(a.at(i)%j == 0) a.at(i) /= j;
                    }
                }
            }
            if(a.at(i) != 1){
                if(v.at(a.at(i))){
                    cout << "setwise coprime" << endl;
                    return 0;
                }else v.at(a.at(i)) = true;
            }
        }
    }
    cout << "pairwise coprime" << endl;

    return 0;
}