#include <bits/stdc++.h>
using namespace std;
void cp() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  cp();
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i += 1) {
    cin >> a[i];
  };
  long long jk = *max_element(a, a + n);
  long long kt = 0;
  long long jh = 0;
  for (long long i = 2; i * i <= jk; i++) {
    long long ct = 0;
    for (long long j = 0; j < n; j += 1) {
      if (a[j] % i == 0) {
        ct++;
      }
    }
    if (ct == n) {
      cout << "not coprime";
      jh = 1;
      break;
    } else if (ct >= 2) {
      kt = 1;
    }
  }
  if (jh == 0) {
    if (kt == 0)
      cout << "pairwise coprime";
    else {
      cout << "setwise coprime";
    }
  }
}
