#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
using ll = long long;
using P = pair<int, int>;
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;
}
template <class T>
istream &operator>>(istream &is, vector<T> &v) {
  for (int i = 0; i < (int)v.size(); i++) cin >> v.at(i);
  return is;
}
template <class T, class U>
ostream &operator<<(ostream &os, pair<T, U> p) {
  cout << '(' << p.first << ", " << p.second << ')';
  return os;
}
template <class T>
void print(const vector<T> &v, const string &delimiter = " ") {
  for (int i = 0; i < (int)(v.size()); i++)
    cout << (0 < i ? delimiter : "") << v.at(i);
  cout << endl;
}
template <class T>
void print(const vector<vector<T>> &vv, const string &delimiter) {
  for (const auto &v : vv) print(v, delimiter);
}
const int MAX_V = 1000001;
int divide[MAX_V + 1];
vector<int> sieve() {
  for (int i = 0; i < MAX_V + 1; i++) divide[i] = 1;
  vector<int> is_prime(MAX_V + 1, true);
  for (int i = 2; i <= MAX_V; i++) {
    if (!is_prime.at(i)) continue;
    is_prime.at(i) = true;
    divide[i] = i;
    for (int j = i + i; j <= MAX_V; j += i) {
      is_prime.at(j) = false;
      divide[j] = i;
    }
  }
  vector<int> res;
  for (int i = 2; i <= MAX_V; i++)
    if (is_prime.at(i)) res.push_back(i);
  return res;
}
map<int, int> prime_factor(int n) {
  map<int, int> res;
  while (1 < n) {
    res[divide[n]]++;
    n /= divide[n];
  }
  return res;
}
vector<int> sieve(int n) {
  vector<int> is_prime(n + 1, true);
  for (int i = 2; i <= n; i++) {
    if (!is_prime.at(i)) continue;
    is_prime.at(i) = true;
    for (int j = i + i; j <= n; j += i) is_prime.at(j) = false;
  }
  vector<int> res;
  for (int i = 2; i <= n; i++)
    if (is_prime.at(i)) res.push_back(i);
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  cin >> a;
  sieve();
  bool is_pc = true;
  vector<int> max_e(MAX_V);
  vector<int> cnt_e(MAX_V);
  for (int i = 0; i < (int)(n); i++) {
    auto ps = prime_factor(a[i]);
    bool all_su = true;
    for (auto [p, e] : ps) {
      cnt_e[p]++;
      if (e <= max_e[p]) {
        all_su = false;
      }
      chmax(max_e[p], e);
    }
    if (!all_su) {
      is_pc = false;
    }
  }
  if (is_pc) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  bool is_sc = false;
  auto ps = sieve(MAX_V);
  for (int p : ps) {
    if (cnt_e[p] != 0 && cnt_e[p] < n) {
      is_sc = false;
      break;
    }
  }
  if (is_sc)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
