#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
const int N = 1000005;
void solve() {
  long long n;
  cin >> n;
  map<long long, long long> mm;
  vector<long long> v(n);
  long long zz;
  for (long long i = 0; i <= n - 1; i++) {
    cin >> v[i];
    zz = (i == 0) ? v[i] : gcd(v[i], zz);
    mm[v[i]]++;
  }
  long long poss = 1;
  for (auto i : v) {
    for (int j = 2 * i; j < N; j++) {
      if (mm.find(j) != mm.end()) {
        poss = 0;
        break;
      }
    }
    if (poss == 0) break;
  }
  if (poss) {
    cout << "pairwise coprime" << '\n';
  } else if (zz == 1)
    cout << "setwise coprime" << '\n';
  else
    cout << "not coprime" << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    solve();
  }
  return 0;
}
