#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
const int INF = 1000000007;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
int main() {
  int n;
  cin >> n;
  vector<long long> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  vector<map<long long, int>> cnt(n), cnt2(n);
  int tmp = v[n - 1];
  for (long long j = 2; j * j <= tmp; j++) {
    while (tmp % j == 0) {
      cnt2[n - 1][j]++;
      tmp /= j;
    }
  }
  if (tmp != 1) cnt2[n - 1][tmp]++;
  cnt[n - 1] = cnt2[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    tmp = v[i];
    for (long long j = 2; j * j <= tmp; j++) {
      while (tmp % j == 0) {
        cnt2[i][j]++;
        cnt[i][j]++;
        tmp /= j;
      }
    }
    if (tmp != 1) cnt2[i][tmp]++, cnt[i][tmp]++;
    for (auto k : cnt[i + 1]) cnt[i][k.first] += k.second;
  }
  bool ok = true;
  for (int i = 0; i < n - 1; i++) {
    for (auto j : cnt2[i]) {
      if (cnt[i + 1][j.first] >= 1) ok = false;
    }
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long gc = v[0];
  for (int i = 1; i < n; i++) gc = gcd(v[i], gc);
  if (gc == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
