#include <bits/stdc++.h>
using namespace std;
void print(const vector<long long int> &a) {
  for (int i = 0; i < a.size(); i++) cout << a[i] << " ";
  cout << "\n";
}
int small(int a) {
  if (a % 2 == 0) return 2;
  for (int i = 3; i * i <= a; i += 2) {
    if (a % i == 0) {
      return i;
    }
  }
  return a;
}
void solve() {
  int n;
  cin >> n;
  vector<long long int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) a[i] = small(a[i]);
  sort(a.begin(), a.end());
  int counter = 1;
  for (int i = 1; i < n; i++) {
    if (a[i] == a[i - 1]) counter++;
  }
  int counter2 = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == 1) counter2++;
  }
  if (counter == 1 || counter2 == n)
    cout << "pairwise coprime";
  else if (counter != n || counter2 > 0)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
int main() { solve(); }
