#include <bits/stdc++.h>
using namespace std;
const long long MAXR = 1000000;
const long long INF = 1 << 29;
const long long LLINF = (1LL << 60LL);
const long long MOD = 1000000007;
const long long MAX_V = 500;
const long long MAX = 2100000;
const double pi = acos(-1);
const double eps = 1e-10;
long long dx[8] = {1, 0, -1, 0, 1, -1, 1, -1};
long long dy[8] = {0, 1, 0, -1, 1, -1, -1, 1};
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
map<long long, long long> res;
map<long long, long long> res2;
bool ok1 = true, ok2 = true;
void prime_factor(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    long long cnt = 0;
    while (n % i == 0) {
      if (cnt == 0 && res[i] > 0) {
        ok1 = false;
      }
      res[i]++;
      n /= i;
      cnt++;
    }
  }
  if (n != 1) res[n]++;
  return;
}
void solve() {
  long long n;
  long long a[1000010];
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = n - 1; i >= 0; i--) {
    prime_factor(a[i]);
    if (ok1 == false) break;
  }
  for (auto i : res) {
    long long cnt = 0;
    for (long long j = 0; j < n; j++) {
      if (a[j] % i.first == 0) cnt++;
    }
    if (cnt == n) ok2 = false;
  }
  if (ok1 == true) {
    cout << "pairwise coprime" << endl;
    return;
  }
  if (!ok2) {
    cout << "not coprime" << endl;
    return;
  }
  cout << "setwise coprime" << endl;
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  long long t = 1;
  for (long long i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
