#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return (a == 0 ? b : gcd(b % a, a)); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int T = 1;
  for (int t = 0; t < T; t++) {
    int N;
    bool is_pairwise = true;
    int current_GCD;
    cin >> N;
    vector<int> vec(N, 0);
    cin >> vec[0];
    current_GCD = vec[0];
    for (int n = 1; n < N; n++) {
      cin >> vec[n];
      current_GCD = gcd(current_GCD, vec[n]);
      for (int i = n - 1; i >= 0; i--) {
        if (gcd(vec[n], vec[i]) != 1) is_pairwise = false;
      }
    }
    cout << (is_pairwise
                 ? "pairwise coprime"
                 : (current_GCD == 1 ? "setwise coprime" : "not coprime"))
         << endl;
  }
  return 0;
}
