#include <bits/stdc++.h>
using namespace std;
long long a[1000100];
bool b[1000100];
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < 1000010; i++) {
    b[i] = true;
  }
  sort(a, a + n);
  bool bo = true;
  for (long long i = 0; i < n; i++) {
    if (!b[a[i]]) {
      bo = false;
      break;
    }
    for (long long k = 1; k * k <= a[i]; k++) {
      if (a[i] % k == 0) {
        if (!b[k] || k == 1) {
        } else {
          for (long long j = k; j < 1000010; j += k) {
            b[j] = false;
          }
        }
        if (!b[a[i] / k]) {
        } else {
          for (long long j = a[i] / k; j < 1000010; j += a[i] / k) {
            b[j] = false;
          }
        }
      }
    }
  }
  if (bo) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long g = a[0];
  for (long long i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
