#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  ll N = pow(10, 6);
  vector<vector<int>> r(pow(10, 6) + 1, vector<int>(1, 0));
  for (ll i = 2; i <= N; ++i) {
    if (r[i].size() == 1) {
      for (ll j; i * j <= N; ++j) {
        r[i * j].push_back(i);
      }
    }
  }
  vector<int> c(pow(10, 6) + 1, 0);
  int f = 1;
  for (int i = 0; i < (n); ++i) {
    for (int j = 0; j < (r[a[i]].size()); ++j) {
      c[r[a[i]][j]]++;
      if (c[r[a[i]][j]] != 1 && r[a[i]][j] != 0) {
        f = 0;
      }
    }
  }
  if (f == 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (int i = 0; i < (c.size()); ++i) {
    if (c[i] == n && i != 0) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
  return 0;
}
