#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1000000007;
const ld PI = acos(-1);  
const ld EPS = 0.0000000001;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define rep(i, n) for(ll i=0; i<(ll)(n); i++)
#define repd(i, n) for(ll i=n-1; 0<=i; i--)
#define FOR(i, a, b) for(ll i=a; i<(ll)(b); i++)
#define FORD(i, a, b) for(ll i=b-1; (ll)(a)<=i; i--)
#define ALL(x) x.begin(), x.end()
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};


int main(){
    ll n;   cin >> n;
    vector<ll> a(n);
    rep(i, n) cin >> a[i];
    map<ll, ll> key;

    sort(ALL(a));
    ll tmp = a.back();
    ll res=1;
    for(ll i=2; i*i<=tmp; i++){
        bool flag=false;
        rep(j, n){
            if(a[j]%i==0 && flag){
                res = 0; break;
            }
            if(a[j]%i==0) flag = true;
        }
        if(!res) break;
    }
    
    
    if(res) cout << "pairwise coprime" << endl;
    else{
        res=a[0];
        rep(i, n-1){
            res = gcd(res, a[i+1]);
            //cout << res << ' ';
        }
        //cout << res << ' ';
        if(res==1) cout << "setwise coprime" << endl;
        else cout << "not coprime" << endl;
    }
}
