#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
const int MOD = 1000000007;
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 (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
map<int, int> prime_factors(int n) {
  map<int, int> res;
  if (n == 1) {
    res[n] = 1;
    return res;
  }
  for (int i = 2, _n = n; i * i <= _n; ++i) {
    while (n % i == 0) {
      ++res[i];
      n /= i;
    }
  }
  if (n != 1) res[n] = 1;
  return res;
}
int gcd(int a, int b) {
  if (a % b == 0)
    return (b);
  else
    return (gcd(b, a % b));
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  map<int, int> facs;
  int tot = 0;
  int allgcd = a[0];
  for (int i = 0; i < (n); i++) {
    auto mp = prime_factors(a[i]);
    bool ok = true;
    for (const auto &m : mp) {
      if (facs.count(m.first)) ok = false;
      facs[m.first] += m.second;
    }
    if (ok) tot++;
    if (i > 0) allgcd = gcd(allgcd, a[i]);
    ;
  }
  if (tot == n)
    cout << "pairwise coprime" << endl;
  else if (allgcd == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
