#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;
    int a;
    cin >> N;
    cin >> a;
    current_GCD = a;
    for (int n = 1; n < N; n++) {
      int b;
      cin >> b;
      if (gcd(a, b) != 1) is_pairwise = false;
      current_GCD = gcd(current_GCD, b);
    }
    cout << (is_pairwise
                 ? "pairwise coprime"
                 : (current_GCD == 1 ? "setwise coprime" : "not coprime"))
         << endl;
  }
  return 0;
}
