#include <bits/stdc++.h>
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
const int lim =  1e6;
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    vector<vector<int>> fac(lim + 1);
    vector <bool> p(lim + 1, 1);
    vector <int> sth(lim + 1, 0);
    for(int i = 2; i <= lim; i++) if(p[i]) for(int j = 2*i; j <= lim; j += i){
        p[j] = 0;
        fac[j].pb(i);
    }
    int n; cin >> n;
    vector <int> v(n);
    for(int &x: v) cin >> x;
    for(int x: v){
        //cout << fac[x].size() << "\n";
        for(int y: fac[x]){
            sth[y]++;
            //cout << y << "\n";
        }
    }
    int g = v[0];
    for(int x: v) g = __gcd(x, g);
    int s = 0;
    for(int i = 2; i <= lim; i++) if(sth[i] > 1) s++;
    //cout << sth[5] << '\n';
    if(s == 0) cout << "pairwise coprime\n";
    else if(g == 1) cout << "setwise coprime\n";
    else cout << "not coprime\n";
}
