#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  int n, a[1000001];
  vector<int> c;
  bool k[1000002] = {0};
  c.push_back(2);
  int z = 0;
  for (int i = 3; i < 1000002; i += 2) {
    if (k[i]) continue;
    c.push_back(i);
    for (int j = i * 3; j < 1000002; j += 2 * i) k[j] = 1;
  }
  int ci = c.size();
  cin >> n;
  bool o1 = 0;
  int b = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1) o1 = 1;
    b = max(b, a[i]);
  }
  int k1;
  for (int i = 0; c[i] <= b; i++) {
    k1 = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] % c[i] == 0) k1++;
    }
    z = max(z, k1);
    if (z >= n) break;
    if (o1 && z > 1) break;
  }
  if (z <= 1)
    cout << "pairwise coprime" << endl;
  else if (o1 || z < n)
    cout << "setwise coprime" << endl;
  else if (z >= n)
    cout << "not coprime" << endl;
  return 0;
}
