#include <bits/stdc++.h>
using namespace std;
long long n;
long long a[1000005];
bool p[1000005];
bool used[1000005];
long long GCD(long long a, long long b) {
  while (a && b) {
    if (a > b)
      a %= b;
    else
      b %= a;
  }
  return a + b;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  memset(p, true, sizeof(p));
  p[0] = false;
  p[1] = false;
  for (long long i = 2; i < 1000005; i++) {
    if (p[i])
      for (long long j = i + i; j < 1000005; j += i) {
        p[j] = false;
      }
  }
  vector<bool> used(1000005, false);
  cin >> n;
  bool f = true;
  long long G;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (!i)
      G = a[0];
    else
      G = GCD(G, a[i]);
    if (p[a[i]]) {
      if (used[a[i]]) f = false;
      used[a[i]] = true;
    }
    for (long long j = 2; j * j <= a[i]; j++) {
      if ((a[i] % j) == 0) {
        if (used[j]) f = false;
        used[j] = true;
      }
    }
  }
  if (f) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (G == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
