#include <bits/stdc++.h>
using namespace std;
vector<int> get_prime(int n) {
  vector<bool> done(n + 1, false);
  vector<int> ans;
  for (int i = 2; i < n + 1; i++) {
    if (!done[i]) {
      ans.push_back(i);
      if (i * i < n) {
        for (int j = i; j <= n / i; j++) {
          done[i * j] = true;
        }
      }
    }
  }
  return ans;
}
int gcd(int p, int q) {
  if (p % q == 0) {
    return q;
  } else {
    return gcd(q, p % q);
  }
}
int main() {
  int n, g, a;
  cin >> n;
  vector<int> pl = get_prime(1000000);
  int l = pl.size();
  vector<bool> done(l, false);
  bool if_pc = true;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (i == 0) {
      g = a;
    } else {
      g = gcd(g, a);
    }
    if (if_pc) {
      for (int j = 0; j < l; j++) {
        if (a % pl[j] == 0) {
          while (a % pl[j] == 0 && a > 1) {
            a /= pl[j];
          }
          if (done[j]) {
            if_pc = false;
          } else {
            done[j] = true;
          }
        }
        if (a == 1) {
          break;
        }
      }
    }
  }
  if (if_pc) {
    cout << "pairwise coprime" << endl;
  } else if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
