#include <iostream>
#include <vector>
#include <set>
#include <numeric>

using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int max_a = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    max_a = max(a[i], max_a);
  }
  
  vector<int> d(max_a + 1, -1);
  for (int i = 2; i <= max_a; ++i) {
    if (d[i] == -1) {
      for (int k = i; k <= max_a; k += i) {
        if (d[k] == -1) {
          d[k] = i;
        }
      }
    }
  }
  
  set<int> primes;
  bool pairwise = true;
  for (int i = 0; i < n && pairwise; ++i) {
    int tmp = a[i];
    int divisor = d[tmp];
    while (tmp != 1) {
      if (tmp % divisor == 0) {
        tmp /= divisor;
      } else {
        if (primes.find(divisor) == primes.end()) {
          primes.insert(divisor);
          divisor = d[tmp];
        } else {
          pairwise = false;
          break;
        }
      }
    }
  }
  
  int g = a[0];
  for (int i = 1; i < n; ++i) {
    g = gcd(g, a[i]);
  }
  
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}