#include <bits/stdc++.h>
using namespace std;
constexpr int INF = INT_MAX >> 1;
constexpr long long LINF = 5000000000000000LL;
constexpr int MOD = 1000000007;
long long gcd(long long i, long long j) { return i % j ? gcd(j, i % j) : j; }
vector<int> prime, mnpf;
void preprime(int n) {
  prime.resize(0);
  mnpf.assign(n + 1, 1);
  for (int i = 0; i < (n + 1); i++) {
    if (i < 2) continue;
    if (mnpf[i] != 1) continue;
    prime.push_back(i);
    mnpf[i] = i;
    int ii = i;
    while (ii <= n) {
      if (mnpf[ii] == 1) mnpf[ii] = i;
      ii += i;
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  int g = a[0];
  for (int i = 0; i < (n); i++) g = gcd(g, a[i]);
  if (g > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  preprime(n + 1000);
  map<int, int> pri;
  for (int i = 0; i < (n); i++) {
    int k = a[i];
    while (k > 1) {
      pri[mnpf[k]]++;
      int memo = mnpf[k];
      while (mnpf[k] == memo) k /= mnpf[k];
    }
  }
  bool pairwise = true;
  for (auto x : pri) {
    if (x.second > 1) pairwise = false;
  }
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
