#include <bits/stdc++.h>
#define rep(i, s, n) for (int i = s; i < n; i++)
#define rp(i,n) for (int i=0;i<n;i++)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define all_acc(x) (x).begin(), (x).end(), 0LL
#define int long long
#define absSort(v) sort(a.begin(), a.end(), [](int i, int j) -> bool { return abs(i) < abs(j); });
using namespace std;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
using ll = long long;
double pi=3.14159265359;

template <class T, class U>
void chmin(T& t, const U& u) {
    if (t > u) t = u;
}
template <class T, class U>
void chmax(T& t, const U& u) {
    if (t < u) t = u;
}

//出力するよ
void output_tate(vector<int> s){
    int n = s.size();
    for (int i = 0; i < n; i++){
        //if (i != 0)
        //    cout << " ";
        cout << s[i]<<endl;
    }
    //cout << endl;
}

void output_yoko(vector<int> s){
    int n = s.size();
    for (int i = 0; i < n; i++){
        if (i != 0)
            cout << " ";
        cout << s[i];//<<endl;
    }
    cout << endl;
}

void output_yoko(vector<char> s){
    int n = s.size();
    for (int i = 0; i < n; i++){
        if (i != 0)
            cout << " ";
        cout << s[i];//<<endl;
    }
    cout << endl;
}

bool checkset(vector<int> a){
    int ans = a[0];
    for(int i=0;i<(a.size()-1);i++){
        ans = __gcd(ans,a[i+1]);
    }
    if(ans == 1) return true;
    else return false;
}

signed main() {
    int n; cin>>n;
    vector<int> a(n);
    rep(i,0,n) cin>>a[i];
    sort(all(a));

    bool pairwise = true;
    bool setwise = true;

    vector<int> numbers(pow(10,6)+1,0);
    for(int i=0;i<n;i++){
        if(numbers[a[i]]){
            pairwise = false;
            break;
        }

        for(int k=2;k<sqrt(k);k++){
            if(a[i]%k==0){
                if(numbers[k]!=1){
                    int plus = k;
                    while(k<=pow(10,6)){
                        numbers[k] = 1;
                        k += plus;
                    }
                }
            }
        }

        if(numbers[a[i]]==0 && a[i]!=1){
            int plus = a[i];
            int k = plus;
            while(k<=pow(10,6)){
                numbers[k] = 1;
                k += plus;
            }
        }
    }

    if(pairwise) cout<<"pairwise coprime"<<endl;
    else{
        setwise = checkset(a);
        if(setwise) cout<<"setwise coprime"<<endl;
        else cout<<"not coprime"<<endl;
    }

}
