#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,m,n) for(int i=(m);i<(n);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
using ll = long long;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fLL;
const double EPS = 1e-8;
const int MOD = 1000000007;
// const int MOD = 998244353;
const int dy[] = {1, 0, -1, 0}, dx[] = {0, -1, 0, 1};
const int dy8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dx8[] = {0, -1, -1, -1, 0, 1, 1, 1};
template <typename T, typename U> inline bool chmax(T &a, U b) { return a < b ? (a = b, true) : false; }
template <typename T, typename U> inline bool chmin(T &a, U b) { return a > b ? (a = b, true) : false; }
struct IOSetup {
  IOSetup() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(20);
  }
} iosetup;

template <typename T>
vector<pair<T, int>> prime_factorization(T val) {
  vector<pair<T, int>> res;
  for (T i = 2; i * i <= val; ++i) {
    if (val % i != 0) continue;
    int exponent = 0;
    while (val % i == 0) {
      ++exponent;
      val /= i;
    }
    res.emplace_back(i, exponent);
  }
  if (val != 1) res.emplace_back(val, 1);
  return res;
}

vector<bool> sieve_of_eratosthenes(int val) {
  vector<bool> res(val + 1, true);
  res[0] = false;
  if (val >= 1) res[1] = false;
  for (int i = 2; i * i <= val; ++i) {
    if (res[i]) {
      for (int j = i * i; j <= val; j += i) res[j] = false;
    }
  }
  return res;
}

int main() {
  int n; cin >> n;
  vector<int> a;
  REP(i, n) {
    int ai; cin >> ai;
    if (ai > 1) a.emplace_back(ai);
  }
  n = a.size();
  if (n <= 78498) {
    vector p(1000001, false);
    bool is_p = true;
    REP(i, n) {
      for (auto [k, v] : prime_factorization(a[i])) {
        if (p[k]) {
          is_p = false;
          break;
        }
        p[k] = true;
      }
      if (!is_p) break;
    }
    if (is_p) {
      cout << "pairwise coprime\n";
      return 0;
    }
  }
  int g = a[0];
  FOR(i, 1, n) g = gcd(g,  a[i]);
  cout << (g == 1 ? "setwise coprime\n" : "not coprime\n");
  return 0;
}
