#include <bits/stdc++.h>
using namespace std;
int g(int u, int v) {
  int shift;
  if (u == 0) return v;
  if (v == 0) return u;
  shift = __builtin_ctz(u | v);
  u >>= __builtin_ctz(u);
  do {
    v >>= __builtin_ctz(v);
    if (u > v) {
      unsigned int t = v;
      v = u;
      u = t;
    }
    v = v - u;
  } while (v != 0);
  return u << shift;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int n, i;
  bool done = false;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  int cur = v[0];
  for (i = 0; i < n - 1 && !done; i++) {
    cur = g(cur, v[i]);
    for (int j = i + 1; j < n; j++) {
      if (g(v[i], v[j]) != 1) {
        done = true;
        break;
      }
      if (i == n - 2 && j == n - 1) {
        cout << "pairwise coprime\n";
        return 0;
      }
    }
  }
  for (int k = i; k < n; k++) cur = g(cur, v[k]);
  if (cur == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
