#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
T gcd(T a, T b) {
  return b == 0 ? a : gcd(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  T g = gcd(a, b);
  return a * b / g;
}
void solve() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long g = 0;
  for (int i = 0; i < n; i++) g = gcd(g, a[i]);
  if (g != 1) {
    cout << "not coprime" << endl;
  } else {
    long long p = 1;
    for (int i = 0; i < n; i++) {
      if (gcd(p, a[i]) > 1) {
        cout << "setwise coprime" << endl;
        return;
      }
      p *= a[i];
    }
    cout << "pairwise coprime" << endl;
  }
  return;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  solve();
  return 0;
}
