#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  int n, a[1000001];
  int b[1000000] = {0};
  vector<int> c;
  bool k[1000002] = {0};
  c.push_back(2);
  int z = 0;
  for (int i = 3; i < 1000002; i += 2) {
    if (k[i]) continue;
    c.push_back(i);
    for (int j = i; j < 1000002; j += 2 * i) k[j] = 1;
  }
  int ci = c.size();
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < ci; j++) {
      if (c[j] > a[i]) {
        break;
      } else {
        if (a[i] % c[j] == 0) {
          b[c[j]]++;
          z = max(z, b[c[j]]);
          while (a[i] % c[j] == 0) {
            a[i] /= c[j];
          }
        }
      }
    }
  }
  if (z >= n)
    cout << "not coprime" << endl;
  else if (z <= 1)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
