#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;
}
using P = pair<long long, long long>;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
const long long dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const long long dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const long long INF = 1e15;
const long long MOD = 1e9 + 7;
const long long MAX = 1e6 + 1;
signed main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (long long)n; i++) cin >> a[i];
  vector<long long> dp(MAX, -1);
  dp[1] = 1;
  for (long long i = 2; i * i <= MAX; i++) {
    if (dp[i] != -1) continue;
    for (long long j = i; j <= MAX; j += i) {
      dp[j] = i;
    }
  }
  vector<long long> sum(MAX, 0);
  bool pc = true;
  for (long long i = 0; i < (long long)n; i++) {
    long long t = a[i];
    while (t > 1) {
      long long div = dp[t];
      while (t % div == 0) t /= div;
      sum[div]++;
      if (sum[div] > 1) {
        pc = false;
        break;
      }
    }
    if (pc == false) break;
  }
  long long sc = a[0];
  for (long long i = 1; i < n; i++) sc = gcd(sc, a[i]);
  if (pc)
    cout << "pairwise coprime" << endl;
  else if (sc == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
