#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (x < y) return gcd(y, x);
  if (y == 0) return x;
  int a = x - y;
  return (a > y) ? gcd(a, y) : gcd(y, a);
}
int main() {
  int n;
  cin >> n;
  vector<int> v;
  int p;
  for (int i = 0; i < n; i++) {
    cin >> p;
    v.push_back(p);
  }
  bool pairwise = true, setwise = true;
  for (int i = 0; i < n - 1; i++) {
    if (gcd(v[i], v[i + 1]) != 1) {
      pairwise = false;
      break;
    }
  }
  int k = gcd(v[0], v[1]);
  for (int i = 2; i < n; i++) {
    k = gcd(v[i], k);
  }
  if (k != 1) setwise = false;
  if (!pairwise and !setwise) {
    cout << "not coprime" << endl;
  } else if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
