#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
using namespace std;
long long GCD(long long a, long long b) {
  long long x = max(a, b), y = min(a, b);
  if (x % y == 0) {
    return y;
  } else {
    return GCD(y, x % y);
  }
}
long long LCM(long long a, long long b) { return (a / GCD(a, b)) * b; }
int main() {
  long long n;
  cin >> n;
  string ans = "not coprime";
  vector<long long> a(n);
  vector<long long> table(100100, 0);
  long long st;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (long long j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        table[j]++;
        if (a[i] / j != j) table[a[i] / j]++;
      }
    }
  }
  if (table[2] < n) ans = "setwise coprime";
  bool ok = true;
  for (long long i = 2; i < table.size(); i++) {
    if (table[i] > 1) {
      ok = false;
      break;
    }
  }
  if (ok) {
    ans = "pairwise coprime";
  }
  cout << ans << endl;
  return 0;
}
