#include <bits/stdc++.h>
using namespace std;
vector<int> sieve(int n) {
  std::vector<int> res(n);
  std::iota(res.begin(), res.end(), 0);
  for (int i = 2; i * i < n; ++i) {
    if (res[i] < i) continue;
    for (int j = i * i; j < n; j += i)
      if (res[j] == j) res[j] = i;
  }
  return res;
}
void factorize(long long n, vector<int> &prime_cnt, vector<int> &min_factor) {
  int p;
  while (n > 1) {
    p = min_factor[n];
    n /= p;
    if (min_factor[n] != p) {
      prime_cnt[p]++;
    }
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  vector<int> prime_cnt;
  vector<int> prime_list = sieve(1e6);
  prime_cnt.assign(1e6, 0);
  for (int i = 0; i < N; i++) {
    if (A[i] != 1) {
      factorize(A[i], prime_cnt, prime_list);
    }
  }
  bool pw_cp = true;
  bool st_cp = true;
  for (auto val : prime_cnt) {
    if (val == 0) continue;
    if (val != 1) {
      pw_cp = false;
    }
    if (val == N) {
      st_cp = false;
    }
  }
  if (pw_cp) {
    cout << "pairwise coprime" << endl;
  } else if (st_cp) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
