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

//const int mxN = 2e5+9;

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

    int n;
    cin >> n;
    vector<int>a;
    for(int i= 0; i < n; ++i){
        int x;
        cin >> x;
        a.push_back(x);
    }
    bool pw = 1;
    int firstcheck = 0;
//    int second = 0;
    for(int i = 0; i < n; ++i){
        for(int j = i + 1; j < n; ++j){
            firstcheck = __gcd(a[i],a[j]);
            if(firstcheck>1){
                pw =0;
                break;
            }
        }
    }
    bool sw =1;
    int temp = __gcd(a[0],a[1]);
    for(int i = 2; i < n; ++i){
        temp = __gcd(temp,a[i]);
    }
    if(temp!=1){sw=0;}
    if(pw){cout << "pairwise coprime" << endl;}
    else if(sw){cout << "setwise coprime" << endl;}
    else{
        cout << "not coprime" << endl;
    }
    return 0;
}
