#include <bits/stdc++.h>
using namespace std;
void insert(int n, vector<set<int>>& ch, bool* des) {
  set<int> se;
  bool x = false;
  for (int i = 2; i <= (int)sqrt(n); ++i) {
    x = false;
    while (n % i == 0) {
      x = true;
      n = n / i;
    }
    if (x) se.insert(i);
  }
  if (n != 1) se.insert(n);
  if (ch.size() != 0) {
    for (int i : se)
      if (ch.back().count(i)) *des = true;
    se.insert(ch.back().begin(), ch.back().end());
    ch.push_back(se);
  } else
    ch.push_back(se);
}
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  ;
  int n;
  cin >> n;
  vector<int> v(n), res;
  for (int i = 0; i < n; ++i) cin >> v[i];
  bool x = false;
  int num = 0;
  vector<set<int>> ch;
  for (int i = n - 1; i >= 0; --i) {
    x = false;
    insert(v[i], ch, &x);
    if (!x) {
      ++num;
    }
  }
  if (num == v.size())
    cout << "pairwise coprime";
  else {
    if (num > 0)
      cout << "setwise comprime";
    else
      cout << "not coprime";
  }
  return 0;
}
