#include <algorithm>
#include <iostream>
#include <stack>
#include <queue>
#include <cmath>
#include <string>
#include <iterator>
#include <map>
#include <set>
#include <iomanip>
#include <vector>
#include <cstdint>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Graph = vector<vector<int>>;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
#define rep(i, N) for(int i = 0; i < N; i++)
#define rep2(i, l, r) for (ll i = (ll)l; i < (ll)(r); i++)
#define INF 1000000000000000000
#define MAX 200001

const ll MOD = 1000000007;

template <typename T > inline string toString(const T &a) {ostringstream oss; oss << a; return oss.str();};

int func(ll N,vector<ll> &A){
    vector<int> isPrime(1001,1);
    for(int i = 2; i < 1001; i++){
        if(isPrime[i] == 0) continue;
        for(int j = 2*i; j < 1001; j+=i){
            isPrime[j] = 0;
        }
    }
    int flag = 0;
    vector<int> check;
    for(int i = 2; i < 1001; i++){
        if(isPrime[i] == 1) check.push_back(i);
    }
    int s=check.size();
    vector<int> cntl(s,0);
    rep(i,s){
        int now = check[i];
        int cnt = 0;
        for(int j = 0; j < N; j++){
            if(now > A[j]) continue;
            if(A[j]%now == 0){
                cnt++;
            }
        }
        cntl[i] = cnt;
    }
    flag = 2;
    rep(i,s){
        if(cntl[i] == N){
            flag = 0;
            break;
        }
        else if(cntl[i] >= 2) flag = 1;
    }
    return flag;
}

int main(){
    ll N;
    cin >> N;
    vector<ll> A(N);
    rep(i,N) cin >> A[i];
    int flag = func(N,A);
    if(flag == 0){
        cout << "not coprime" << endl;
    }
    else if(flag == 1){
        cout << "setwise coprime" << endl;
    }
    else{
        cout << "pairwise coprime" << endl;
    }
}
