#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int N, a, g;
  bool is_pairwise = true, mod[1000010];
  for (int i = 0; i < 1000010; ++i) {
    mod[i] = false;
  }
  cin >> N;
  for (int i = 0; i < N; ++i) {
    cin >> a;
    if (i == 0) {
      g = a;
    } else {
      g = gcd(g, a);
    }
    for (int j = 1; j * j <= a; ++j) {
      if (a % j == 0) {
        if (j != 1 && (mod[j] == true || mod[a / j] == true))
          is_pairwise = false;
        mod[j] = true;
        mod[a / j] = true;
      }
    }
  }
  if (is_pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
