#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e9 + 7;
const int N = (int)1e6 + 123;
const long long inf = (long long)1e18 + 1;
const double pi = acos(-1.0);
const double eps = 1e-9;
const int dx[] = {0, 0, 1, 0, -1};
const int dy[] = {0, 1, 0, -1, 0};
int n, a[N], used[N], lp[N];
vector<int> pr;
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
inline void boost() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
inline void Solve() {
  cin >> n;
  for (int i = 2; i <= 1000000; i++) {
    if (!lp[i]) {
      lp[i] = i;
      pr.push_back(i);
    }
    for (int j = 0;
         j < (int)pr.size() && pr[j] <= lp[i] && i * pr[j] <= 1000000; j++)
      lp[i * pr[j]] = pr[j];
  }
  bool ok = 1;
  int G = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    G = gcd(G, a[i]);
    int x = a[i];
    while (x > 1) {
      if (used[lp[x]]) ok = 0;
      x /= lp[x];
    }
    x = a[i];
    while (x > 1) {
      used[lp[x]] = 1;
      x /= lp[x];
    }
  }
  if (ok)
    cout << "pairwise coprime";
  else if (G == 1)
    cout << "setwise coprime";
  else
    cout << "no coprime";
}
signed main() {
  boost();
  int tt = 1;
  while (tt--) {
    Solve();
  }
  return 0;
}
