#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(20);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
  }
  int div[1000011];
  for (int i = 0; i < (int)(n); i++) {
    bool f = true;
    for (int j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        f = true;
        div[j]++;
        if (j * j != a[i]) div[a[i] / j]++;
      }
    }
    if (f) div[a[i]]++;
  }
  bool f = false;
  vector<int> op;
  for (int i = 0; i < (int)(100001); i++) {
    if (div[i] > 1) {
      f = true;
      if (div[i] == n) {
        cout << "not coprime" << endl;
        return 0;
      }
    }
  }
  if (f) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
  }
  return 0;
}
