#include <bits/stdc++.h>
using namespace std;
int here[1000005];
int maxx;
void fact(int v) {
  double limit = sqrt(v);
  for (int i = 2; i <= limit; i++) {
    if (v % i == 0) {
      here[i]++;
      maxx = max(maxx, here[i]);
      while (v % i == 0) {
        v /= i;
      }
    }
  }
}
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (long long i = 0; i < long long(n); i++) {
    cin >> v[i];
  }
  for (long long i = 0; i < long long(n); i++) {
    fact(v[i]);
  }
  if (maxx == n) {
    cout << "not coprime" << endl;
  } else if (maxx == 1) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
