#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
using Edge = pair<int, ll>;
using Graph = vector<vector<int>>;
using WeightedGraph = vector<vector<Edge>>;
const ll INF64 = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;
const int CASES = 3;
bitset<1000001> calc_divisor(long long n) {
  bitset<1000001> res;
  for (long long i = 1LL; i * i <= n; ++i) {
    if (n % i == 0) {
      res[i] = 1;
      long long j = n / i;
      if (j != i) res[j] = 1;
    }
  }
  return res;
}
void solve() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  bitset<1000001> bs_all;
  bitset<1000001> bs_all2;
  bs_all2.flip();
  bool flag1 = true;
  ll all = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    bitset<1000001> bs_tmp = calc_divisor(a[i]);
    if (i != 0 && (bs_all & bs_tmp) != 2) {
      flag1 = false;
    }
    bs_all |= bs_tmp;
    bs_all2 &= bs_tmp;
  }
  string ans = "not coprime";
  if (flag1) ans = "pairwise coprime";
  if (!flag1 && bs_all2 == 2) ans = "setwise coprime";
  cout << ans << endl;
}
int main() {
  solve();
  return 0;
}
