#include <bits/stdc++.h>
#include <numeric>
//#define DEBUG
#define REP(i, nn ) for(int i = 0 ; i < (int) nn; i++)
#define deb(x) std::cout << #x << " " << x << endl;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
template<typename... T>
void read(T& ... a){
    ((cin >> a),...);
}
template<typename... T>
void write(T... a){
    ((cout << a << "\n"),...);
}

template<typename... T>
void write_space(T... a){
    ((cout << a << " "),...);
}
void solve(){
    //inflate_prime();
    int n;
    read(n);
    vi a(n);
    REP(i,n) cin >> a[i];
    map<int,int> mp;
    int i ; 
    for(i = 0 ; i < n ; i++){
        int num = a[i];
        bool break_condition = false;
        for(int k = 2; k <  num / k ; k++){
            if(num % k == 0){
                mp[k]++;
                if(mp[k] > 1){
                    break_condition = true;
                    break;
                }
                while(num % k == 0){
                    num /= k;
                }
            }
        } 
        if(break_condition){
            break;
        }
    }
    if( i == n){
        cout << "pairwise coprime" << endl;
        return;
    }else{
        //need to check setwise coprime
        int g = gcd(a[0], a[1]);
        for(int k = 2 ; k < n ; k++){
            g = gcd(g, a[k]);
        }
        if( g == 1){
            cout << "setwise coprime" << endl;
        }else{
            cout << "not coprime" << endl;
        }
    }
}

int main()
{
    //making data IO Fast
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(NULL);
    /****************************/
    solve();
    return 0;
}

