#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];
    vector<int> cnt(1000005);
    rep(i,n){
        for(int j = 1; j*j <= a[i]; j++){
            if(a[i] % j == 0){
                cnt[j]++;
                if(cnt[j] > 1 && j != 1){
                    cout << "pairwise coprime" << endl;
                    return 0;
                }
                if(a[i]/j == j) continue; 
                cnt[a[i]/j]++;
                if(cnt[a[i]/j] > 1 && a[i]/j != 1){
                    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;
}
