# 1 "e.cpp"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "e.cpp"
# 1 "/home/tysm/dev/cpplib/bin/../include/cpplib/stdinc.hpp" 1
       
# 11 "/home/tysm/dev/cpplib/bin/../include/cpplib/stdinc.hpp"
# 1 "/home/tysm/dev/cpplib/bin/../stdlib/bits/stdc++.h" 1
 #include<bits/stdc++.h>
# 12 "/home/tysm/dev/cpplib/bin/../include/cpplib/stdinc.hpp" 2
# 1 "/home/tysm/dev/cpplib/bin/../stdlib/ext/pb_ds/assoc_container.hpp" 1
 #include<ext/pb_ds/assoc_container.hpp>
# 13 "/home/tysm/dev/cpplib/bin/../include/cpplib/stdinc.hpp" 2
# 1 "/home/tysm/dev/cpplib/bin/../stdlib/ext/pb_ds/tree_policy.hpp" 1
 #include<ext/pb_ds/tree_policy.hpp>
# 14 "/home/tysm/dev/cpplib/bin/../include/cpplib/stdinc.hpp" 2
# 23 "/home/tysm/dev/cpplib/bin/../include/cpplib/stdinc.hpp"
using namespace std;
using namespace __gnu_pbds;

using ii = pair<int64_t, int64_t>;
using tt = tuple<int64_t, int64_t, int64_t>;

using vi = vector<int64_t>;
using vd = vector<double>;
using vb = vector<bool>;
using vii = vector<ii>;
using vtt = vector<tt>;

using vvi = vector<vi>;
using vvd = vector<vd>;
using vvb = vector<vb>;
using vvii = vector<vii>;
using vvtt = vector<vtt>;
# 60 "/home/tysm/dev/cpplib/bin/../include/cpplib/stdinc.hpp"
template<typename T>
ostream &operator<<(ostream &lhs, const vector<T> &rhs)
{
    if(is_floating_point<T>::value)
        lhs << fixed << setprecision(10);
    for(size_t i = 0; i < rhs.size(); ++i) {
        if(i)
            lhs << ' ';
        lhs << rhs[i];
    }
    return lhs;
}

template<typename T, size_t N>
ostream &operator<<(ostream &lhs, const array<T, N> &rhs)
{
    if(is_floating_point<T>::value)
        lhs << fixed << setprecision(10);
    for(size_t i = 0; i < rhs.size(); ++i) {
        if(i)
            lhs << ' ';
        lhs << rhs[i];
    }
    return lhs;
}
# 2 "e.cpp" 2
# 1 "/home/tysm/dev/cpplib/bin/../include/cpplib/math/euclid.hpp" 1
       


/**
 * Euclidean GCD.
 *
 * Computes the greatest commom divisor of
 * two integers.
 *
 * Time Complexity: O(log(min(a, b))).
 * Space Complexity: O(1).
 */
uint64_t gcd(uint64_t a, uint64_t b)
{
    for(; a != 0; a %= b)
        swap(a, b);
    return b;
}

/**
 * Extended Euclidean GCD.
 *
 * Besides computing the GCD it also returns
 * the roots of a*x + b*y = gcd(a, b).
 *
 * Time Complexity: O(log(min(a, b))).
 * Space Complexity: O(1).
 */
tuple<uint64_t, int64_t, int64_t> extended_gcd(uint64_t a, uint64_t b)
{
    int64_t x = 0, y = 1, x1 = 1, y1 = 0;
    while(a != 0) {
        uint64_t q = b / a;
        tie(x, x1) = make_tuple(x1, x - q * x1);
        tie(y, y1) = make_tuple(y1, y - q * y1);
        tie(a, b) = make_tuple(b % a, a);
    }
    return make_tuple(b, x, y);
}

/**
 * Euclidean Derivated LCM.
 *
 * Time Complexity: O(log(min(a, b))).
 * Space Complexity: O(1).
 */
uint64_t lcm(const uint64_t a, const uint64_t b)
{
    // same as a*b/gcd(a, b) but avoiding overflow.
    return a / gcd(a, b) * b;
}
# 3 "e.cpp" 2

int32_t main(){
    (ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL));
    int64_t n;
    cin >> n;

    vi arr(n);
    for(int64_t &i:arr)
        cin >> i;
    reverse(arr.begin(), arr.end());

    int64_t g = arr[0], ok = true;
    for(int64_t i=1; i<n; ++i){
        g = gcd(g, arr[i]);
        if(g > 1)
            ok = false;
    }

    cout << (g > 1? "not coprime" : (ok? "pairwise coprime" : "setwise coprime")) << "\n";

    return 0;
}
