#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ui = unsigned int;
using ld = long double;
template <typename T>
ostream &operator<<(ostream &stream, vector<T> v) {
  for (const auto &it : v) stream << it << " ";
  return stream;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &ostream, pair<T1, T2> p) {
  ostream << p.first << " " << p.second;
  return ostream;
}
void swap(long long a, long long b) {
  long long t = a;
  a = b;
  b = t;
}
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
map<long long, long long> getPrimeFactors(long long n) {
  map<long long, long long> ans;
  while (n % 2 == 0) {
    ans[2]++;
    n /= 2;
  }
  for (long long i = 3; i * i <= n; i = i + 2) {
    while (n % i == 0) {
      ans[i]++;
      n = n / i;
    }
  }
  if (n > 2) ans[n]++;
  return ans;
}
void solve(long long tc) {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  bool isPairWise = 1;
  map<long long, long long> suff[n];
  map<long long, long long> PFs[n];
  suff[n - 1] = getPrimeFactors(a[n - 1]);
  PFs[n - 1] = suff[n - 1];
  for (long long i = n - 2; i >= 0; i--) {
    suff[i] = getPrimeFactors(a[i]);
    PFs[i] = suff[i];
    for (auto &it : suff[i + 1]) suff[i][it.first] += it.second;
  }
  for (long long i = 0; i < n - 1; i++) {
    for (auto &it : PFs[i]) {
      if (it.first == 1) continue;
      if (suff[i + 1][it.first]) {
        isPairWise = false;
        break;
      }
    }
    if (!isPairWise) break;
  }
  if (isPairWise) {
    cout << "pairwise coprime";
    return;
  }
  long long g = a[0];
  for (long long i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime";
    return;
  }
  cout << "not coprime";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long t = 1;
  for (long long i = 1; i <= t; i++) {
    solve(i);
  }
  return 0;
}
