#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) scanf("%d", &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(a[i]/j != j) cnt[a[i]/j]++;
            }
        }
    }
    bool flag = true;
    for(int i = 2; i <= 1000000; i++) if(cnt[i] > 1) flag = false;
    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;
}
