#include <bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
using namespace std;
void YesNo(bool b) { cout << (b ? "Yes" : "No") << endl; }
void YESNO(bool b) { cout << (b ? "YES" : "NO") << endl; }
vector<long long> yakusu(long long n) {
  vector<long long> v;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      v.push_back(i);
      if (i != n / i) {
        v.push_back(n / i);
      }
    }
  }
  sort(v.begin(), v.end());
  return v;
}
vector<bool> GetIsPrimeList(long long max) {
  vector<bool> list;
  for (long long i = 0; i <= max; i++) {
    list.push_back(true);
  }
  for (long long i = 2; i < sqrt(max); i++) {
    if (list[i]) {
      for (long long j = 0; i * (j + 2) < max; j++) {
        list[i * (j + 2)] = false;
      }
    }
  }
  list[0] = false;
  list[1] = false;
  return list;
}
long long gcd(long long x, long long y) {
  long long r;
  while ((r = x % y) != 0) {
    x = y;
    y = r;
  }
  return y;
}
long long N;
long long A[1000001];
bool flg[1000001];
vector<bool> p_list;
bool IsPairwise() {
  for (long long i = 0; i < N; i++) {
    if (flg[A[i]]) return false;
    if (p_list[A[i]]) {
      flg[A[i]] = true;
      continue;
    }
    auto yaku = yakusu(A[i]);
    for (long long j = 1; j < yaku.size(); j++) {
      long long y = yaku[j];
      if (flg[y]) continue;
      long long cur = y;
      while (true) {
        cur += y;
        if (cur > 1000000) break;
        flg[cur] = true;
      }
    }
  }
  return true;
}
bool IsSetWize() {
  long long g = A[0];
  for (long long i = 1; i < N; i++) {
    g = gcd(g, A[i]);
  }
  return g == 1;
}
signed main() {
  cin >> N;
  for (long long(i) = 0; (i) < (N); (i)++) cin >> A[i];
  sort((A), (A) + (N));
  (reverse((A), (A) + (N)));
  p_list = GetIsPrimeList(1000000);
  if (IsPairwise()) {
    cout << "pairwise coprime" << endl;
  } else if (IsSetWize()) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
