#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const long long MAX = 1e6 + 10;
long long n, a[MAX];
bool use[MAX], pr[MAX];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n;
  for (long long i = (0); i < (n); i++) cin >> a[i];
  bool p = true;
  long long uq = n;
  for (long long i = (0); i < (n); i++) {
    if (use[a[i]]) {
      p = false;
      uq--;
    }
    use[a[i]] = true;
  }
  bool s = true;
  memset(pr, true, sizeof(pr));
  for (long long i = 2; i <= 1e6; i++) {
    if (pr[i]) {
      long long cnt = 0;
      for (long long j = 1; j * i <= 1e6; j++) {
        if (j > 1) pr[i * j] = false;
        if (use[i * j]) cnt++;
      }
      if (cnt > 1) p = false;
      if (cnt == uq) s = false;
    }
  }
  if (p) {
    cout << ("pairwise coprime") << endl;
    return 0;
  }
  if (s) {
    cout << ("setwise coprime") << endl;
    return 0;
  }
  cout << ("not coprime") << endl;
  return 0;
}
