#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
set<long long> fact(long long z) {
  set<long long> ret;
  for (long long j = 2; j * j <= z; j++) {
    while (z % j == 0) z /= j, ret.insert(j);
  }
  if (z != 1) ret.insert(z);
  return ret;
}
int main() {
  long long n;
  cin >> n;
  long long a[n];
  bool pairwise = 1;
  set<long long> allfactors;
  long long g = a[0];
  for (long long p = 0; p < n; p++) {
    cin >> a[p];
  }
  for (long long p = 0; p < n; p++) {
    if (p > 0) g = gcd(a[p], g);
  }
  for (long long k = 0; k < n; k++) {
    if (pairwise) {
      set<long long> prime_factors = fact(a[k]);
      for (auto df : prime_factors) {
        if (allfactors.count(df) > 0) {
          pairwise = 0;
          break;
        } else {
          allfactors.insert(df);
        }
      }
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
