#include <bits/stdc++.h>
using namespace std;
set<int>::iterator its;
int main() {
  int n, t;
  cin >> n;
  map<int, int> m;
  for (int i = 0; i < n; i++) {
    cin >> t;
    for (int j = 2; j * j <= t; j++) {
      if (t % j == 0) t /= j;
      m[j]++;
    }
    if (t > 1) m[t]++;
  }
  for (auto it : m) {
    if (it.second == n) {
      cout << "not coprime"
           << "\n";
      return 0;
    }
  }
  for (auto it : m) {
    if (it.second > 1) {
      cout << "setwise coprime"
           << "\n";
      return 0;
    }
  }
  cout << "pairwise coprime"
       << "\n";
  return 0;
}
