#include <bits/stdc++.h>
using namespace std;
using P = pair<long long, long long>;
using V = vector<long long>;
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve_abc_e() {
  long long l_ans = 0;
  long long n;
  cin >> n;
  V a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  V sum_gcd(n);
  sum_gcd[n - 1] = a[n - 1];
  for (long long i = n - 1; i >= (long long)(1); i--) {
    sum_gcd[i - 1] = gcd(sum_gcd[i], a[i - 1]);
  }
  bool is_pc = true;
  for (long long i = 0; i < (long long)(n); i++) {
    if (sum_gcd[i] != a[i] && sum_gcd[i] != 1) {
      is_pc = false;
    }
  }
  if (is_pc) {
    cout << "pairwise coprime"
         << "\n";
    return;
  }
  long long all_gcd = a[0];
  for (long long i = 0; i < (long long)(n); i++) all_gcd = gcd(all_gcd, a[i]);
  if (all_gcd == 1) {
    cout << "setwise coprime"
         << "\n";
  } else {
    cout << "not coprime"
         << "\n";
  }
  return;
}
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve_abc_e();
  return 0;
}
