#include <algorithm>
#include <bitset>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <unordered_map>
#include <unordered_set>

using namespace std;

#define ll long long
#define pb push_back
#define debug1(x) cerr << #x << " = " << x << '\n';
#define debug2(x, y) cerr << #x << " = " << x << "   " << #y << " = " << y << "\n";
#define _ ios_base::sync_with_stdio(0);cin.tie(NULL);

const ll N = 1000005;

void solve() {
    int n;
    cin >> n;
    map<int, int> mp;
    int a[n+1] = {};
    for(int i = 1; i<=n; i++) {
        cin >> a[i];
        mp[a[i]]++;
    }
    vector<ll> div[N+1];
    for(ll i = 2; i<=N; i++) {
        for(ll j = i*2; j<=N; j+=i) {
            div[j].push_back(i);
        }
    }
    bool ok = true;
    map<int, int> mpp;
    for(int i = 1; i<=n; i++) {
        if(a[i] > 1) {
            for(auto it: div[a[i]]) {
                mpp[it] ++;
            }
        }
    }
    for(auto it: mpp) {
        if(it.second > 1) ok = false;
    }
    for(int i = 1; i<=n; i++) {
        if(mp[a[i]] > 1 && a[i] > 1) ok = false;
    }
    if(ok) {
        cout << "pairwise coprime";
        return;
    }
    int g = a[1];
    for(int i = 2; i<=n; i++) {
        g = __gcd(a[i], g);
    }
    if(g == 1) {
        cout << "setwise coprime";
    }
    else {
        cout << "not coprime";
    }
}

int main() {_
    int t = 1;
//    cin >> t;
    for(int i = 1; i<=t; i++) {
        solve();
    }
    return 0;
}
