#include <bits/stdc++.h>
using namespace std;
bool m[1000005] = {0};
vector<int> v;
int n;
int a[1000005];
int main(void) {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 2; i < 1000001; i++) {
    if (!m[i]) {
      for (int j = 1; i * j <= n; j++) {
        m[i * j] = 1;
      }
      v.push_back(i);
    }
  }
  memset(m, false, sizeof(m));
  bool flag = 0, ok = 1;
  for (int i = 0; i < n; i++) {
    bool flag1 = 0;
    for (int j = 0; j < v.size(); j++) {
      if (v[j] * v[j] > a[i]) break;
      if (a[i] % v[j] == 0) {
        if (!m[v[j]]) {
          m[v[j]] = 1;
        } else {
          flag1 = 1;
        }
      }
    }
    if (i != 0) {
      if (!flag1)
        flag = 1;
      else
        ok = 0;
    }
  }
  if (flag) {
    if (ok)
      cout << "pairwise coprime";
    else
      cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
  return 0;
}
