#include <bits/stdc++.h>

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;
using std::bitset;

#define rep(i,n)    for(int i=0; i<(int)(n); i++)
#define reps(i,s,e) for(int i=s; i<(int)(e); i++)
#define coutd(i) cout << std::fixed << std::setprecision(i)
typedef long double ld;
typedef long long ll;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef std::pair<int, int> pii;
typedef std::pair<ll, ll> pll;

template<class T>
using Set = std::set<T>;
template<class T, class U>
using Map = std::map<T, U>;

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

const int INT_BIG = 1<<28;

int main() {
    int N;
    cin >> N;
    vint nums(N);
    rep(i, N) {
        cin >> nums[i];
    }
    int judgenot = -1;
    rep(i, N-1) {
        if (judgenot == -1) {
            judgenot = std::__gcd(nums[i], nums[i+1]);
        }
        judgenot = std::__gcd(judgenot, std::__gcd(nums[i], nums[i+1]));
    }
    if (judgenot != 1) {
        cout << "not coprime" << endl;
        return 0;
    }
    vector<bool> flag(1000000+5, false);
    rep(i, N) {
        int num = nums[i];
        for (int j = 2; j*j <= num; j++) {
            if (num % j == 0) {
                if (flag[j]) {
                    cout << "setwise coprime" << endl;
                    return 0;
                }
                flag[j] = true;
            }
        }
        if (flag[num]) {
            cout << "setwise coprime" << endl;
            return 0;
        }
        flag[num] = true;
    }
    cout << "pairwise coprime" << endl;
}