#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
const long long INF(0x3f3f3f3f3f3f3f3fll);
const int inf(0x3f3f3f3f);
long long a[maxn];
long long yin[maxn];
signed main() {
  std::ios::sync_with_stdio(false), cin.tie(0);
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  bool ok = true;
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        yin[j]++;
        if (yin[j] > 1 && j != 1) ok = false;
        if (a[i] / j != j) {
          yin[a[i] / j]++;
          if (yin[a[i] / j] > 1 && j != 1) ok = false;
        }
      }
    }
  }
  if (ok) {
    cout << "pairwise coprime\n";
  } else {
    ok = true;
    for (long long i = 2; i <= 1e6; i++) {
      if (yin[i] >= n) {
        ok = false;
        break;
      }
    }
    if (ok) {
      cout << "setwise coprime\n";
    } else {
      cout << "not coprime\n";
    }
  }
  return 0;
}
