#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using Vii = vector<vector<int>>;
using Gjudge = vector<vector<bool>>;
using Vi = vector<int>;
using Vl = vector<ll>;
using Vd = vector<double>;
using Vld = vector<long double>;
using Vll = vector<vector<ll>>;
using Vldd = vector<vector<ld>>;
using Vs = vector<string>;
using Vb = vector<bool>;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using Pli = pair<ll, int>;
using VPi = vector<Pi>;
using VPl = vector<Pl>;
using VPli = vector<Pli>;
using Ti = tuple<int, int, int>;
using Tl = tuple<ll, ll, ll>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const int Mod = static_cast<int>(1e9 + 7);
const int INF = INT_MAX;
const ll LINF = LLONG_MAX;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll gcd(ll a, ll b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
vector<bool> IsPrime;
std::vector<int> Eratosthenes(ll N) {
  std::vector<bool> is_prime(N + 1);
  for (ll i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<int> P;
  for (ll i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (ll j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
int main() {
  int n;
  cin >> n;
  Vi A(n);
  for (int i = 0; i < n; i++) cin >> A[i];
  ll t = A[0];
  for (int i = 1; i < n; i++) {
    t = gcd(t, A[i]);
  }
  if (t != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  bool jd = true;
  for (const auto& x : Eratosthenes(n)) {
    Vi B(n);
    for (int i = 0; i < n; i++) {
      B[i] = A[i] % x;
    }
    sort(B.begin(), B.end());
    if (B[0] == 0 && B[1] == 0) {
      jd = false;
      break;
    }
  }
  if (jd) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
