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

#define _GLIBCXX_DEBUG
#define all(v) (v).begin(),(v).end()

using ll=long long;
using pii=pair<int, int>;
using vi=vector<int>;
using vii=vector<vector<int>>;

const ll LINF=1LL<<60;
const int INF=1<<29;
const ll MOD=1e9+7;

template<typename T> bool chmax(T &a,const T b){if(a < b){a=b; return true;} return false;}
template<typename T> bool chmin(T &a,const T b){if(a > b){a=b; return true;} return false;}


int main(){
    int N; cin >> N;
    vi A(N), cnt(10000001, 0);
    for(auto &x : A){
        cin >> x;
        cnt[x]++;
    }

    int g=A[0];
    for(int i=1; i<N; i++){
        g=__gcd(g, A[i]);
    }
    for(int i=2; i<=1000000; i++){
        int a=0;
        for(int j=i; j<=1000000; j+=i){
            if(cnt[j]) a++;
        }
        if(a > 1){
            if(g == 1) cout << "setwise coprime" << endl;
            else cout << "not coprime" << endl;
            return 0;
        }
    }
    cout << "pairwise coprime" << endl;
    return 0;
}