#include <bits/stdc++.h>
using namespace std;
mt19937 RNG(chrono::steady_clock::now().time_since_epoch().count());
template <typename T>
T ceil(T a, T b) {
  return (a + b - 1) / b;
}
template <typename T>
T binpow(T a, T b, T m) {
  a %= m;
  T res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> m(1000002);
  for (long long i = 0; i < n; i++) {
    m[a[i]]++;
    for (long long j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        m[j]++;
        if (m[j] > 1) {
          break;
        }
        while (a[i] % j == 0) {
          a[i] /= j;
        }
      }
    }
  }
  long long res = 0;
  for (long long i = 1; i < 1000001; i++) {
    res = max(res, m[i]);
  }
  if (res <= 1) {
    cout << "pairwise coprime";
  } else if (res < n) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long t = 1;
  for (long long i = 1; i < t + 1; i++) {
    solve();
  }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
