#include <bits/stdc++.h>
#define ll long long 
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t = 1; 
    for(int T = 0; T < t ; T++){
        ll n;
        cin >> n;A
        ll a[n], cnt[10000001] = {0};
        for(int i = 0 ; i < n ; i++){
            cin >> a[i];
            cnt[a[i]]++;
        }
        bool ok = true;
        for(ll i = 2; i <= 1e6; i++){
            ll ans = 0;
            for(ll j = i; j <= 1e6; j += i){
                ans += cnt[j];
            }
            if(ans > 1){
                ok = false;
                break;
            }
        }
        if(ok == true)
            cout << "pairwise coprime" << endl;
        else{
            ll gh = a[0];
            for(int i = 1; i < n; i++)
                gh = __gcd(gh, a[i]);
            if(gh == 1)
                cout << "setwise coprime" << endl;
            else
                cout << "not coprime" << endl;
        }
    }
    return 0;
}
