#include <bits/stdc++.h>
using namespace std;
bool gozyohou1(vector<int> a) {
  sort(a.begin(), a.end());
  int pi;
  int d;
  for (int i = 0; i < (int)a.size() - 1; i++) {
    pi = 1;
    d = a.at(i);
    if (2 * d > a.at(a.size() - 1)) {
      break;
    }
    for (int j = i + 1; j < (int)a.size(); j++) {
      pi = pi * a.at(j) % d;
    }
    while (pi > 1) {
      d %= pi;
      swap(d, pi);
      if (pi == 0) {
        return false;
      }
    }
  }
  return true;
}
bool gozyohou2(vector<int> a) {
  sort(a.begin(), a.end());
  while (a.at(0) > 1) {
    for (int i = 1; i < (int)a.size(); i++) {
      a.at(i) %= a.at(0);
    }
    a.erase(remove_if(a.begin(), a.end(), [](int x) { return x == 0; }),
            a.end());
    if ((int)a.size() == 1) {
      return false;
    }
    sort(a.begin(), a.end());
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  if (gozyohou1(a)) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (gozyohou2(a)) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
