#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long N = 1e6 + 1;
long long a[N], primes[N];
long long n, m, u, v;
vector<long long> p;
bool pair1() {
  for (long long i = 0; i < n; i++) {
    for (long long pi : p) {
      if (pi > a[i]) {
        break;
      }
      if (a[i] % pi == 0) {
        if (primes[pi] == 1) {
          return false;
        }
        primes[pi] = 1;
      }
    }
  }
  return true;
}
bool set1() {
  vector<long long> final;
  for (long long i = 0; i < n; i++) {
    for (long long pi : p) {
      if (pi > a[i]) {
        break;
      }
      if (a[i] % pi == 0) {
        final.push_back(pi);
      }
    }
    if (final.size() == 0) {
      return true;
    }
    p = final;
    final.clear();
  }
  return false;
}
void solve() {
  for (long long i = 2; i < N; i++) {
    if (primes[i] == 0) {
      p.push_back(i);
      for (long long j = i; j < N; j += i) {
        primes[j] = 1;
      }
    }
  }
  memset(primes, 0, sizeof(primes));
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (pair1()) {
    cout << "pairwise coprime";
  } else if (set1()) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  cout << "\n";
  ;
  return 0;
}
