#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e10;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
struct cww {
  cww() {
    ios::sync_with_stdio(false);
    cin.tie(0);
  }
} star;
std::vector<int> Eratosthenes(const int N) {
  std::vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<int> P;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.__emplace_back(i);
    }
  }
  return P;
}
signed main() {
  long long n;
  cin >> n;
  long long arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  std::vector<int> primes = Eratosthenes(1000000);
  long long tmp;
  vector<long long> common_elm;
  tmp = arr[0];
  std::set<long long> all_elm;
  for (int i = 0; i < primes.size(); i++) {
    if (tmp < primes[i]) {
      break;
    }
    if (tmp % primes[i] == 0) {
      while (tmp % primes[i] == 0) {
        tmp /= primes[i];
      }
      tmp /= primes[i];
      all_elm.insert(primes[i]);
      common_elm.push_back(primes[i]);
    }
  }
  vector<long long> tmp_v;
  long long not_pflag = 0;
  long long prim;
  for (int i = 1; i < n; i++) {
    tmp = arr[i];
    tmp_v.clear();
    for (auto itr = all_elm.begin(); itr != all_elm.end(); ++itr) {
      prim = *itr;
      if (tmp < prim) {
        break;
      }
      if (tmp % prim == 0) {
        while (tmp % prim == 0) {
          tmp /= prim;
        }
        if (all_elm.find(prim) != all_elm.end()) {
          not_pflag = 1;
        } else {
          all_elm.insert(prim);
        }
        tmp_v.push_back(prim);
      }
    }
    vector<long long> intersection;
    set_intersection(tmp_v.begin(), tmp_v.end(), common_elm.begin(),
                     common_elm.end(),
                     inserter(intersection, intersection.end()));
    common_elm = intersection;
  }
  if (not_pflag == 0) {
    cout << "pairwise coprime" << endl;
  } else if (common_elm.size() == 0) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
