#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define ALL(x) (x).begin(), (x).end()
#define REP(i ,n) for(int i = 0; i < (int)(n); i++)
#define pb push_back
typedef vector<int>vint;
typedef vector<ll>vll;
template<typename T> istream &operator>>(istream &is, vector<T> &vec){ for (auto &v : vec) is >> v; return is; }
template<typename A,typename B>inline bool chmin(A &a,const B &b){if(a>b){a=b;return true;}else{return false;}}
template<typename A,typename B>inline bool chmax(A &a,const B &b){if(a<b){a=b;return true;}else{return false;}}

ll MOD = 1e9+7;

int main()
{
    int N;
    cin >> N;
    vll A(N);
    cin >> A;
    bool flag = false;
    ll ans = __gcd(A[0],A[1]);
    for(int i=2; i<N; i++){
        if(N-1 == i && ans == 1){
            flag = true;
        }
        ans = __gcd(ans,A[i]);
    }
    if(ans == 1 && flag){
        cout <<"pairwise coprime" << endl;
    }else if(ans == 1){
        cout <<"setwise coprime" << endl;
    }else{
        cout <<"not coprime" << endl;
    }
}