#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
vector<int> memo;
vector<long long> vec;
long long n;
void prepare() {
  for (int i = 0; i < n; i++) memo.at(vec.at(i))++;
}
int main() {
  cin >> n;
  vec.resize(n);
  for (long long i = 0; i < n; i++) cin >> vec.at(i);
  vector<long long> culsum(n, 0);
  long long mx = *max_element(vec.begin(), vec.end());
  culsum.at(0) = vec.at(0);
  memo.resize(mx + 1, 0);
  for (long long i = 1; i < n; i++)
    culsum.at(i) = gcd(culsum.at(i - 1), vec.at(i));
  bool is_prime = true;
  for (long long i = 1; i < n; i++) {
    if (culsum.at(i) > 1) is_prime = false;
  }
  bool is_pairwise_prime = true;
  prepare();
  for (int i = 2; i * i <= mx; i++) {
    int cnt = 0;
    for (int j = 1; i * j <= mx; j++) {
      if (memo.at(i * j)) cnt += memo.at(i * j);
    }
    if (cnt >= 2) {
      is_pairwise_prime = false;
      break;
    }
  }
  if (is_pairwise_prime) {
    cout << "pairwise coprime" << endl;
  } else if (culsum.at(n - 1) == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
