#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  map<long long int, long long int> factors;
  bool found = true;
  for (long long int i = 0; i < n; i++) {
    long long int ele = a[i];
    for (long long int j = 2; j * j <= ele; j++) {
      if (ele % j == 0) {
        if (ele / j == j) {
          if (factors[j] > 0) {
            found = false;
            break;
          }
          factors[j]++;
        } else {
          if (factors[j] > 0) {
            found = false;
            break;
          }
          if (factors[ele / j] > 0) {
            found = false;
            break;
          }
          factors[ele / j]++;
          factors[j]++;
        }
      }
    }
    if (!found) break;
  }
  if (found) {
    cout << "pairwise coprime";
    return;
  }
  for (auto it : factors) {
    if (it.second > 1 and it.first != 1) {
      found = false;
      break;
    }
  }
  if (found) {
    cout << "pairwise coprime";
    return;
  }
  long long int GCD = a[0];
  for (long long int i = 1; i < n; i++) GCD = gcd(GCD, a[i]);
  if (GCD == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return;
}
int32_t main() {
  long long int T = 1;
  for (long long int i = 1; i <= T; i++) solve();
  return 0;
}
