#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main(){
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i,n) cin >> a[i];
    int mx = 0;
    rep(i,n) mx = max(mx, a[i]);
    vector<int> cnt(1000005);
    map<int,int> m;
    rep(i,n) m[a[i]]++;
    bool flag = true;
    for(int i = 2; i*i <= mx; i++){
        int t = 0;
        if(cnt[i] != 0) continue;
        for(int j = i; j <= mx; j+=i){
            if(m[j] == 1){
                t++;
            }
            if(t >= 2){
                flag = false;
            }
            cnt[i]++;
        }
    }
    if(flag){
        cout << "pairwise coprime" << endl;
        return 0;
    }
    int g = a[0];
    rep(i,n) g = __gcd(g, a[i]);
    if(g == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
}