#include <bits/stdc++.h>
using namespace std;
const long long oo = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-9;
vector<long long> primes;
map<long long, long long> primeSet;
vector<vector<long long> > buckets;
vector<long long> arr;
long long N;
vector<bool> thing;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  primes = vector<long long>();
  thing = vector<bool>(1000001, true);
  for (long long i = (2); i < (1000001); i++) {
    if (!thing[i]) continue;
    primes.push_back(i);
    primeSet[i] = primes.size() - 1;
    long long s = i;
    while (s < thing.size()) {
      thing[s] = false;
      s += i;
    }
  }
  cin >> N;
  arr = vector<long long>(N, 0);
  for (long long i = (0); i < (N); i++) cin >> arr[i];
  buckets = vector<vector<long long> >(primes.size(), vector<long long>());
  for (long long i = (0); i < (N); i++) {
    long long j = 0;
    long long A = arr[i];
    if (primeSet.find(A) != primeSet.end()) {
      buckets[primeSet[A]].push_back(i);
      continue;
    }
    while (A > 1) {
      if (A % primes[j] == 0) {
        buckets[j].push_back(i);
        while (A % primes[j] == 0) A = A / primes[j];
      }
      j++;
    }
  }
  bool pairwise = true;
  for (long long i = (0); i < (buckets.size()); i++) {
    if (buckets[i].size() > 1) pairwise = false;
  }
  bool setwise = true;
  for (long long i = (0); i < (buckets.size()); i++) {
    if (buckets[i].size() == N) setwise = false;
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
