#include <bits/stdc++.h>
using namespace std;
bool isprime[1000005];
vector<long> prime;
void fillPrime() {
  for (bool& i : isprime) {
    i = true;
  }
  for (long i = 2; i < 1000005; i++) {
    if (isprime[i]) {
      prime.push_back(i);
      for (long j = (i * i); j < 1000005; j += i) {
        isprime[j] = false;
      }
    }
  }
}
long freq[1000005] = {0};
void fillfreq(long x) {
  if (isprime[x]) {
    freq[x]++;
    return;
  }
  for (long p : prime) {
    if (x % p == 0) {
      freq[p]++;
    }
    if (x < (p * p)) break;
  }
}
int32_t main() {
  std::ios::sync_with_stdio(false);
  fillPrime();
  long n, x;
  cin >> n;
  for (long i = 0; i < n; i++) {
    cin >> x;
    fillfreq(x);
  }
  bool isa = true, isb = true;
  for (long i = 0; i < 1000005; i++) {
    if (freq[i] > 1) isa = false;
    if (freq[i] == n) isb = false;
  }
  if (isa) {
    cout << "pairwise coprime"
         << "\n";
  } else if (isb)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
  return 0;
}
