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

typedef long long ll;

//#define int ll

const int intf = 1e9 , maxn = 1e5 + 5;
const ll inf = 2e18;

void solve(){
    int n; cin >> n;
    vector <bool> was(1e6 + 1 , false);
    ll g = 0;
    bool flag = true;
    while(n --> 0){
        ll x; cin >> x;
        g = __gcd(g , x);
        for (int i = 2; i*i <= x; i ++){
            if (x % i == 0){
                if (was[i]){
                    flag = false;
                }
                was[i] = true;
            }
        }
    }

    if (flag){
        cout << "pairwise coprime\n";
    } else if (g == 1){
        cout << "setwise coprime\n";
    } else {
        cout << "not coprime\n";
    }
}

signed main() {
    //freopen("input.txt" , "r" , stdin);

    int t = 1; //cin >> t;
    while(t-->0)
        solve();

	return 0;
}
