#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 1e9 + 7;
template <typename T>
vector<T> smallest_prime_factors(T n) {
  vector<T> spf(n + 1);
  for (int i = 0; i <= n; i++) spf[i] = i;
  for (T i = 2; i * i <= n; i++) {
    if (spf[i] == i) {
      for (T j = i * i; j <= n; j += i) {
        if (spf[j] == j) {
          spf[j] = i;
        }
      }
    }
  }
  return spf;
}
int gcd(int a, int b) { return (a % b == 0) ? b : gcd(b, a % b); }
template <typename T = int>
vector<T> factolization(T x, vector<T>& spf) {
  vector<T> ret;
  while (x != 1) {
    ret.push_back(spf[x]);
    x /= spf[x];
  }
  sort(ret.begin(), ret.end());
  return ret;
}
bool flag = true;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto&& e : a) {
    cin >> e;
  }
  auto spf = smallest_prime_factors(1000000 + 10);
  vector<bool> divisor(1000000 + 15, false);
  for (int i = 0; i < n; ++i) {
    vector<int> tmp = factolization(a[i], spf);
    for (const auto& e : tmp) {
      if (divisor[e]) flag = false;
    }
    for (const auto& e : tmp) {
      divisor[e] = true;
    }
  }
  if (flag) {
    cout << "pairwize coprime" << endl;
    return 0;
  }
  int tmp = a[0];
  for (int i = 1; i < n; ++i) {
    tmp = gcd(tmp, a[i]);
  }
  if (tmp == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
