#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  int n;
  vector<int> sieve(592, 0);
  for (int x = 2; x <= 592; x++) {
    if (sieve[x]) continue;
    for (int u = 2 * x; u <= 592; u += x) {
      sieve[u] = x;
    }
  }
  vector<int> primes;
  for (int i = 2; i < 592; i++)
    if (sieve[i] == 0) primes.push_back(i);
  sieve.clear();
  cin >> n;
  vector<int> nos(n);
  for (int i = 0; i < n; i++) cin >> nos[i];
  sort(nos.begin(), nos.end());
  set<long long> temper;
  bool pairwise = true;
  for (int i = 0; i < n; i++) {
    if (nos[i] == 1) continue;
    if (i != n - 1) {
      if (nos[i] == nos[i + 1]) {
        pairwise = false;
        break;
      }
    }
    temper.insert((long long)nos[i] * (long long)nos[i]);
  }
  if (pairwise == true) {
    for (int i = 0; i < n; i++) {
      if (nos[i] == 1) continue;
      if (temper.find((long long)nos[i]) != temper.end()) {
        pairwise = false;
        break;
      }
    }
  }
  if (pairwise == true) {
    int count = 0;
    for (int i = 0; i < primes.size(); i++) {
      count = 0;
      for (int j = 0; j < n; j++) {
        if (nos[j] % primes[i] == 0) count++;
      }
      if (count > 1) {
        pairwise = false;
        break;
      }
    }
  }
  if (pairwise == true) {
    cout << "pairwise coprime";
    return 0;
  }
  int gek = nos[0];
  for (int i = 1; i < n; i++) {
    gek = gcd(gek, nos[i]);
  }
  if (gek == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
