#include <bits/stdc++.h>
using namespace std;
vector<long long> g(1e6 + 1);
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  long long n, t, ans, mx = -1;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
    mx = max(mx, v[i]);
    t = v[i];
    for (long long i = 1; i <= sqrt(t); i++) {
      if (t % i == 0) {
        if (t / i == i) {
          g[i]++;
        } else {
          g[i]++;
          g[t / i]++;
        }
      }
    }
  }
  bool pairwise = 1;
  for (long long i = 2; i <= mx && pairwise; i++) {
    if (g[i] > 1) {
      pairwise = false;
      break;
    }
  }
  if (pairwise == 0) {
    ans = v[0];
    for (auto &a : v) {
      ans = gcd(ans, a);
    }
    if (ans == 1) {
      cout << "setwise coprime\n";
      return 0;
    }
  } else {
    cout << "pairwise coprime\n";
    return 0;
  }
  cout << "no coprime\n";
}
