#include <bits/stdc++.h>
using namespace std;
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;
}
template <typename T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
const long long mod = 1000000007;
const long long LINF = 1LL << 62;
const int INF = 1 << 30;
int dx[] = {1, 0, -1, 0, 1, -1, 1, -1};
int dy[] = {0, 1, 0, -1, 1, -1, -1, 1};
vector<int> Sieve(int n) {
  vector<int> ret(n + 1, 0);
  vector<int> pr;
  for (int i = 2; i <= n; i++) {
    if (ret[i] == 0) {
      ret[i] = i;
      pr.emplace_back(i);
    }
    for (int j = 0; j < pr.size() && pr[j] <= ret[i] && i * pr[j] <= n; j++)
      ret[i * pr[j]] = pr[j];
  }
  return ret;
}
int main() {
  auto p = Sieve(1000000);
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> cnt(2000000, 0);
  for (int i = 0; i < n; i++) {
    while (a[i] != 1) {
      auto pair<long long, long long> = p[a[i]];
      cnt[pair<long long, long long>]++;
      while (a[i] % pair<long long, long long> == 0) {
        a[i] /= pair<long long, long long>;
      }
    }
  }
  bool f = true;
  for (int i = 0; i < cnt.size(); i++) {
    if (cnt[i] > 1) {
      f = false;
      break;
    }
  }
  if (f)
    puts("pairwise coprime");
  else {
    long long aa = a[0];
    for (int i = 0; i < n; i++) {
      aa = gcd(aa, a[i]);
    }
    if (aa == 1)
      puts("setwise coprime");
    else
      puts("not coprime");
  }
  return 0;
}
