#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1LL << 60;
const long long int Mod = 1000000007;
using ll = long long int;
using ci = const int;
using vi = vector<int>;
using Vi = vector<long long int>;
using P = pair<int, int>;
using PLL = pair<ll, ll>;
using matrix = vector<vector<ll>>;
template <class T>
bool chmax(T &former, const T &b) {
  if (former < b) {
    former = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &former, const T &b) {
  if (b < former) {
    former = b;
    return true;
  }
  return false;
}
template <class T>
T sqar(T x) {
  return x * x;
}
template <class T>
inline void princ(T x) {
  cout << x << " ";
};
template <class T>
inline void print(T x) {
  cout << x << "\n";
};
template <class T>
inline void Yes(T condition) {
  if (condition)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
template <class T>
inline void YES(T condition) {
  if (condition)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
Vi pairw(1000050, 0);
Vi setwi(1000050, 0);
void solve() {
  ll n;
  cin >> n;
  Vi a(n);
  for (ll i = 0; i < (ll)n; i++) {
    cin >> a.at(i);
  }
  bool pairok = true, setok = true;
  for (ll i = 0; i < (ll)n; i++) {
    ll num = a[i];
    for (ll d = 2; d * d <= a[i]; d++) {
      if (num % d != 0)
        setwi[d] = 0;
      else if (pairok) {
        if (pairw[d] == 1) {
          pairw[d] = 2;
          pairok = false;
        }
        if (pairw[d] == 0) pairw[d] = 1;
      }
      while (num % d == 0) {
        if (i == 0) setwi[d] = 1;
        num /= d;
      }
    }
  }
  for (ll i = ll(2); i < ll(1000030); ++i) {
    if (setwi[i] == 1) {
      setok = false;
    }
  }
  if (pairok)
    print("pairwise coprime");
  else if (setok)
    print("setwise coprime");
  else
    print("not coprime");
  return;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  std::cout << std::fixed << std::setprecision(30);
  solve();
  return 0;
}
