#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = 1001001001;
const long long LINF = 1001001001001001001;
void prvec(vector<long long> vec) {
  long long n = vec.size();
  for (int i = 0; i < (int)(n); i++) cout << i << " " << vec.at(i) << "\n";
}
void pr2d(vector<vector<long long>> vvec) {
  long long h = vvec.size();
  long long w = vvec.at(0).size();
  for (int i = 0; i < (int)(h); i++) {
    for (int j = 0; j < (int)(w); j++) {
      cout << vvec.at(i).at(j) << " ";
    }
    cout << "\n";
  }
}
int main() {
  long long n;
  cin >> n;
  vector<bool> a(1001, 1);
  a.at(0) = 0, a.at(1) = 0;
  for (int i = 0; i <= 1000; i++) {
    if (!a.at(i)) continue;
    long long x = i;
    while (true) {
      x += i;
      if (x > 1000) break;
      a.at(x) = 0;
    }
  }
  vector<long long> b(0);
  for (int i = 0; i < (int)(1001); i++) {
    if (a.at(i)) b.push_back(i);
  }
  long long sz = b.size();
  vector<long long> cnt(sz, 0);
  for (int i = 0; i < (int)(n); i++) {
    long long x;
    cin >> x;
    sz = b.size();
    for (int j = 0; j < (int)(sz); j++) {
      if (!(x % b.at(j))) {
        cnt.at(j)++;
      }
      while (!(x % b.at(j))) {
        x /= b.at(j);
      }
    }
  }
  long long mxm = 0;
  for (auto z : cnt) {
    mxm = max(mxm, z);
  }
  if (mxm == n) {
    cout << "not coprime" << endl;
  } else if (mxm >= 2) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
  }
  return 0;
}
