#include <bits/stdc++.h>
using namespace std;
int pr[5000];
map<long long, long long> prime_factor(long long n) {
  map<long long, long long> rtn;
  for (long long i = 2; i * i <= n; i++) {
    while (!(n % i)) {
      ++rtn[i];
      n /= i;
    }
  }
  if (n != 1) rtn[n] = 1;
  return rtn;
}
int main() {
  int n;
  cin >> n;
  for (int(i) = 0; i < (n); i++) {
    long long tmp;
    cin >> tmp;
    map<long long, long long> mp = prime_factor(tmp);
    for (auto p : mp) {
      pr[p.first]++;
    }
  }
  for (int(i) = 0; i < (5001); i++)
    if (pr[i] == n) {
      cout << "not coprime" << endl;
      return 0;
    }
  for (int(i) = 0; i < (5001); i++) {
    if (pr[i] != 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
}
