#include <bits/stdc++.h>
using namespace std;
vector<int64_t> make_divisors(int64_t n) {
  vector<int64_t> divisors;
  for (int64_t i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      divisors.push_back(i);
      if (i != 1 && i * i != n) divisors.push_back(n / i);
    }
  }
  sort(divisors.begin(), divisors.end());
  if (n != 1) divisors.push_back(n);
  return divisors;
}
int f[1100000];
int main() {
  int n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    vector<int64_t> divisors = make_divisors(a[i]);
    for (int j = 0; j < divisors.size(); j++) {
      f[divisors[j]]++;
    }
  }
  int mx = 1;
  for (int i = 2; i <= 1100000; i++) {
    mx = max(mx, f[i]);
  }
  string ans = "not coprime";
  if (mx == 1)
    ans = "pairwise coprime";
  else if (mx != n)
    ans = "setwise coprime";
  cout << ans << endl;
}
