#include <bits/stdc++.h>
using namespace std;
long long int const maxlen = 1e6 + 7;
long long int cnt[maxlen];
void resolve(long long int t) {
  for (long long int i = 2; i * i <= t; i++) {
    if (t % i == 0) {
      cnt[i]++;
      while (t % i == 0) t /= i;
    }
  }
}
void solve() {
  long long int n;
  cin >> n;
  for (long long int i = 0; i < n; i++) {
    long long int t;
    cin >> t;
    resolve(t);
  }
  bool pairwise = true;
  bool setwise = true;
  for (long long int i = 1; i <= maxlen; i++) {
    if (cnt[i] >= 2) {
      pairwise = false;
    }
    if (cnt[i] == n) {
      setwise = false;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return;
  }
  if (setwise) {
    cout << "setwise coprime" << endl;
    return;
  }
  cout << "not coprime" << endl;
}
signed main() { solve(); }
