#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
using namespace std;
vector<long long> PN_chk(100000 + 1, 1);
vector<long long> prime;
void se() {
  long long MAXRR = sqrt(100000) + 1;
  PN_chk[0] = 0;
  PN_chk[1] = 0;
  for (long long i = 2; i <= long long(MAXRR); i++) {
    if (PN_chk[i] == 1)
      for (long long j = i; j <= long long(long long(100000 / i)); j++) {
        PN_chk[j * i] = i;
      }
  }
}
void prime_factorize(long long n) {
  if (n <= 1) return;
  if (PN_chk[n] == 1) {
    prime.push_back(n);
    return;
  }
  prime.push_back(PN_chk[n]);
  prime_factorize(long long(n / PN_chk[n]));
}
int main() {
  se();
  long long n;
  cin >> n;
  vector<long long> factormax(100000, 0);
  vector<long long> factormin(100000, INFINITY);
  bool flgpw = true;
  for (long long i = 0; i < n; i++) {
    prime = vector<long long>(100000);
    long long a;
    cin >> a;
    prime_factorize(a);
    for (long long j = 2; j * j <= 100000; j++) {
      if (factormax[j] > 0 && prime[j] > 0) flgpw = false;
      if (flgpw) factormax[j] = max(prime[j], factormax[j]);
      factormin[j] = min(factormin[j], prime[j]);
    }
  }
  bool flgst = true;
  for (long long i = 2; i < 100000; i++) {
    if (factormin[i] > 0) flgst = false;
  }
  if (flgpw) {
    cout << "pairwise coprime";
  } else if (flgst) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
