#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  long long n;
  cin >> n;
  vector<long long> vec(n);
  for (long long i = 0; i < n; i++) cin >> vec.at(i);
  vector<long long> culsum(n, 0);
  culsum.at(0) = vec.at(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;
  }
  if (is_prime) {
    cout << "pairwise coprime" << endl;
  } else if (culsum.at(n - 1) == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
