#include <bits/stdc++.h>
using namespace std;
const int N = 1000003;
int a[N];
int Prime[N], cnt;
bool p[N];
void pr() {
  for (register int i = 2; i < N; ++i) {
    if (not p[i]) Prime[++cnt] = i;
    for (register int j = 1; j <= cnt and Prime[j] * i < N; ++j) {
      p[Prime[j] * i] = true;
      if (i % Prime[j]) break;
    }
  }
}
int b[N];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  pr();
  Prime[cnt + 1] = 0x7fffffff;
  bool flag = true;
  for (register int i = 1; i <= n; ++i) {
    cin >> a[i];
    for (register int j = 1; Prime[j] <= (a[i] << 1); ++j) {
      if (a[i] % Prime[j] == 0)
        if (++b[Prime[j]] == 2) flag = false;
    }
  }
  if (flag) {
    cout << "pairwise coprime\n";
    return 0;
  }
  for (register int i = cnt; i; --i)
    if (b[Prime[i]] == n) {
      cout << "not coprime\n";
      return 0;
    }
  cout << "setwise coprime\n";
  return 0;
}
