#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <string>
#include <cmath>
#include <queue>
#include <tuple>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <random>
#include <set>
#include <stack>
#include <time.h>

//#include <bits/stdc++.h>
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)
#define FOR(i,i0,n) for(int (i)=(i0);(i)<(n);(i)++)
#define FORR(i,i0,n) for(int (i)=(n)-1; (i)>=(i0);(i)--)
#define SORT(x) sort(x.begin(),x.end())
#define SORTR(x) sort(x.begin(),x.end(),greater<vector<int>>())

#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple

using namespace std;
using ll = long long;
typedef std::pair<int, int> pii;
typedef std::pair<int, double> pid;
typedef std::vector<int> vi;
typedef std::vector<pii> vii;

#define PI 3.14159265358979323846264338327950L
const int mod = 1e9+7;




class UnionFind{
public:
    int uf[200005];
    UnionFind(){
        memset(uf,-1,sizeof uf);
    }
    
    int parent(int i){
        if (uf[i] < 0) return i;
        return uf[i] = parent(uf[i]);
    }
    
    void join(int i, int j){
        int pi = parent(i);
        int pj = parent(j);
        if (pi == pj) return;
        if (size(pi) < size(pj)) swap(pi,pj);
        uf[pi] += uf[pj];
        uf[pj] = pi;
        
    }
    
    int size(int i){
        int pi = parent(i);
        return abs(uf[pi]);
    }
    
    void init(){
        memset(uf,-1,sizeof uf);
    }
};





void solve(){
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i,n) cin >> a[i];
    
    int primes[1000000] = {};
    
    
    bool dame = false;
    
    for(int ii = 0; ii < n; ii++){
        
        int v = a[ii];
        if (v==1) dame = true;
        
        bool ok = false;
        while (v && v%2 == 0){
            v/=2;
            ok = true;
        }
        if (ok){
            if (primes[2] == 1) dame = true;
            else primes[2] = 1;
        }
        
        for (int i = 3; i <= sqrt(v); i = i+2){
            ok = false;
            while (v && v%i == 0){
                ok = true;
                v = v/i;
            }
            if (ok){
                if (primes[i] == 1) dame = true;
                else primes[i] = 1;
            }
        }
        
        if (v > 2){
            if (primes[v] == 1) dame = true;
            else primes[v] = 1;
        }
    }
    
    
    if (dame == 0){
        cout << "pairwise coprime"; return;
    } 
    else{
        int ap = gcd(a[0],a[1]);
        for(int i = 2; i < n;i++){
            ap = gcd(ap,a[i]);
        }
        if (ap==1){
            cout << "setwise coprime";
        }
        else cout << "not coprime";
        
    }
    

        
};



int main() {
    int T;
    //cin >> T;
    T = 1;
    while (T--) {
        solve();
        cout << endl;
    }
}


