#include "bits/stdc++.h"

using namespace std;

#define endl            "\n"
#define sz(x)          (int) (x.size())
#define all(v)          v.begin(), v.end()
#define isOdd(n)       (n&1)
#define pow(n, m)      (ll)powl(n, m)
#define clr(x, val)     memset(x, val, sizeof(x))

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<int> vi;

const int N = 1e6 + 5;
unordered_map<int, int> mp;
vector<int> sieve(N);
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int n, mx = 0; cin >> n;
    int a[n];
    for(auto &i: a) cin >> i, mp[i]++, mx = max(mx, mp[i]);

    int g = 0, p = (mx == 1);


    for(ll i = 2; i * i < N && p; i++){
        if(!sieve[i]){
            ll k = i, c = 0;
            while(k < N){
                if(mp[k]){
                    c++;
                    if(c > 1){
                        p = 0;
                        goto EmergencyGate;
                    }
                }
                k += i;
            }
        }
    }
    EmergencyGate:;

    if(p) return cout << "pairwise coprime", 0;

    for(int i = 0; i < n; i++) g = __gcd(g, a[i]);
    if(g == 1) return cout << "setwise coprime", 0;


    cout << "not coprime";
    return 0;
}
