#include <bits/stdc++.h>
using namespace std;
int g(int a, int b) {
  if (a % b == 0) return b;
  return g(b, a % b);
}
int main() {
  int n, i;
  bool done = false;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  int cur = v[0];
  for (i = 0; i < n - 1 && !done; i++) {
    cur = g(cur, v[i]);
    for (int j = i + 1; j < n; j++) {
      if (g(v[i], v[j]) != 1) {
        done = true;
        break;
      }
      if (i == n - 2 && j == n - 1) {
        cout << "pairwise coprime\n";
        return 0;
      }
    }
  }
  for (int k = i; k < n; k++) cur = g(cur, v[k]);
  if (cur == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
