#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 2;
long long mod = 1e9 + 7;
int t, j, cs = 0, n, a, b, i, dxx[] = {1, 0, 0, -1}, dyy[] = {0, -1, 1, 0}, k,
          m, cnt[N], prime[N];
bool mark[N];
void seive() {
  prime[k++] = 2;
  for (i = 3; i < N; i += 2) {
    if (!mark[i]) {
      prime[k++] = i;
      for (j = 3 * i; j < N; j += 2 * i) {
        mark[j] = 1;
      }
    }
  }
}
int main() {
  cin >> n;
  int ar[n];
  for (i = 0; i <= n - 1; i++) cin >> ar[i];
  seive();
  for (i = 0; i < n; i++) {
    int a = ar[i];
    for (j = 0; prime[j] * prime[j] <= a; j++) {
      if (a % prime[j] == 0) {
        while (a % prime[j] == 0) a /= prime[j];
        cnt[prime[j]]++;
      }
    }
    if (a > 1) cnt[a]++;
  }
  int mx = *max_element(cnt, cnt + N);
  if (mx == 1)
    cout << "pairwise coprime"
         << "\n";
  else if (mx < n)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
}
