#include <bits/stdc++.h>

#ifdef DEBUG
#define PRINT(x)\
    cout<<"func "<<__func__<<": line "<<__LINE__<<": "<<#x<<" = "<<(x)<<endl;
#define PRINTA(a,first,last)\
    cout<<"func "<<__func__<<": line "<<__LINE__<<": "<<#a<<"["<<(first)<<", "<<(last)<<")"<<endl;\
    for (int _i=(first);_i<(last);++_i){cout<<#a<<"["<<_i<<"] = "<<(a)[_i]<<endl;}
#define PRINTI(a,i)\
    cout<<"func "<<__func__<<": line "<<__LINE__<<": "<<#a<<"["<<#i<<"] = "<<#a<<"["<<(i)<<"] = "<<(a)[i]<<endl;
#define dprintf(...) printf(__VA_ARGS__)
#else
#define PRINT(x)
#define PRINTA(a,first,last)
#define PRINTI(a,i)
#define dprintf(...)
#endif

#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);--i)
#define REP(i,n) for (int i=0;i<(n);++i)
#define RREP(i,n) for (int i=(n)-1;i>=0;--i)
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define MOD 1000000007
//#define MOD 998244353

using namespace std;

using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

template <class T, class U> void amax(T& x, U y) {if (x < y) x = y;}
template <class T, class U> void amin(T& x, U y) {if (x > y) x = y;}

template <class T, class U>
std::ostream& operator<<(std::ostream &os, const std::pair<T, U> &p) {
	os << "(" << p.first << ", " << p.second << ")";
	return os;
}
 
template <class T>
std::ostream& operator<<(std::ostream &os, const std::vector<T> &v) {
    os << "[";
	for (int i = 0; i < v.size(); ++i) {
        if (i) {
            if (i % 5 == 0) {
                os << ",\n ";
            } else {
                os << ", ";
            }
        }
		os << v[i];
	}
	os << "]";
	return os;
}

template <class T>
using vec2 = vector<vector<T>>;

template <class T>
using vec3 = vector<vector<vector<T>>>;

template <class T>
vec2<T> vec2_init(int n0, int n1, T x = 0) {
    return vec2<T>(n0, vector<T>(n1, x));
}

template <class T>
vec3<T> vec3_init(int n0, int n1, int n2, T x = 0) {
    return vec3<T>(n0, vec2_init(n1, n2, x));
}

/*
 *           U P
 *           - x
 *            ^
 *            |
 * LEFT -y <--+--> +y RIGHT
 *            |
 *            v
 *           + x
 *         D O W N
 */

const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};

enum {
    DOWN,
    RIGHT,
    UP,
    LEFT,
};

int gcd(int x, int y) {
    while (y != 0) {
        int r = x % y;
        x = y;
        y = r;
    }
    return x;
}

std::vector<int> linear_sieve_prime(int N) {

    std::vector<bool> is_prime(N, true);
    std::vector<int> primes;
    
    for (int i = 2; i < N; ++i) {
        if (is_prime[i]) {
            primes.push_back(i);
        }
        for (int p: primes) {
            int n = i * p;
            if (n >= N) {
                break;
            }
            is_prime[n] = false;
            if (i % p == 0) {
                break;
            }
        }
    }

    return primes;
}

std::vector<int> naive_prime(int N) {

    std::vector<int> primes = {2};

    for (int n = 3; n < N; n += 2) {
        bool is_prime = true;
        for (int p: primes) {
            if (p * p > n) {
                break;
            }
            if (n % p == 0) {
                is_prime = false;
                break;
            }
        }
        if (is_prime) {
            primes.push_back(n);
        }
    }

    return primes;
}

std::vector<std::map<int, int>> linear_sieve_factorize(int N) {

    std::vector<bool> is_prime(N, true);
    std::vector<int> primes;
    std::vector<std::map<int, int>> factors(N);
    
    for (int i = 2; i < N; ++i) {
        if (is_prime[i]) {
            primes.push_back(i);
            ++factors[i][i];
        }
        for (int p: primes) {
            int n = i * p;
            if (n >= N) {
                break;
            }
            is_prime[n] = false;
            factors[n] = factors[i];
            ++factors[n][p];
            if (i % p == 0) {
                break;
            }
        }
    }

    return factors;
}
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    const int A_MAX = 1000000;

    int N;
    cin >> N;
    vector<int> A(N);
    REP(i, N) cin >> A[i];

    int gcd_all = 0;
    REP(i, N) {
        gcd_all = gcd(gcd_all, A[i]);
    }

    if (gcd_all > 1) {
        cout << "not coprime" << endl;
        return 0;
    }

    auto primes = linear_sieve_prime(1000);

    set<int> ps;

    REP(i, N) {
        for (int p : primes) {
            if (A[i] % p == 0) {
                if (ps.count(p)) {
                    cout << "setwise coprime" << endl;
                    return 0;
                } else {
                    ps.insert(p);
                    A[i] /= p;
                    while (A[i] % p == 0) {
                        A[i] /= p;
                    }
                }
            }
        }
        if (A[i] > 1) {
            int p = A[i];
            if (ps.count(p)) {
                cout << "setwise coprime" << endl;
                return 0;
            } else {
                ps.insert(p);
            }
        }
    }
    cout << "pairwise coprime" << endl;
    
    return 0;
}


Measured memory_bytes: 7300