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

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t = 1; 
   // cin >> t;
    for(int T = 0; T < t ; T++){
        ll n, ans = 0;
        cin >> n;
        ll a[n], p[1000001] = {0};
        for(int i = 0 ; i < n ; i++)
            cin >> a[i];
        bool ok = true;
        //cout << "f" << endl;
        for(ll i = 2; i <= 1e6; i++){
            for(ll j = i; j <= 1e6; j += i){
                p[j] = 1;
            }
            ll k = 0;
            for(ll j = 0; j < n; j++){
                if(p[a[i]] == 1)
                    k++;
                if(k >= 2){
                    ok = false;
                    break;
                }
            }
            if(ok == false)
                break;
            for(ll j = 0; j <= 1e6; j++)
                p[j] = 0;
        }
        //cout << "f" << endl;
        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;
}