#include <bits/stdc++.h>
using namespace std;
map<int, int> prime_factor(int n) {
  map<int, int> ret;
  for (int i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if (n != 1) ret[n] = 1;
  return ret;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  cin >> N;
  vector<int> v(N);
  for (long long i = 0; i < long long(N); i++) {
    int a;
    cin >> a;
    v[i] = a;
  }
  sort(v.begin(), v.end());
  map<int, int> pf = prime_factor(v[0]);
  bool isPC = true;
  bool isSC = false;
  bool isGCD1 = true;
  for (auto p : pf) {
    int cnt = 0;
    int fac = p.first;
    for (long long i = 1; i <= long long(v.size() - 1); i++) {
      if (v[i] % fac == 0) cnt++;
    }
    if (cnt != 0 && cnt != N - 1) isPC = false;
    if (cnt == N - 1) {
      isGCD1 = false;
      isPC = false;
    }
  }
  if (isPC) {
    cout << "pairwise coprime" << endl;
  }
  if (!isPC && isGCD1) {
    cout << "setwise coprime" << endl;
    isSC = true;
  }
  if (!isPC && !isSC) cout << "not coprime" << endl;
  return 0;
}
