#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for (auto &v : vec)
    cin >> v;

  vector<int> pairvec(1000001, 0);
  for (auto &v : vec)
    pairvec[v] = 1;

  bool flag = false;
  for (int i = 2; i <= 1000000; ++i) {
    int cnt = 0;
    for (int j = i; j <= 1000000; j+=i) {
      cnt += pairvec[j];
      if (cnt == 2) {
        flag = true;
        break;
      }
    }
    if (flag)
      break;
  }

  if (!flag) {
    cout << "pairwise coprime" << endl;
    return EXIT_SUCCESS;
  }

  int v = vec[0];
  for (int i = 1; i < n; ++i)
    v = __gcd(v, vec[i]);

  if (v == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
