#include <bits/stdc++.h>
using namespace std;
vector<bool> IsPrime;
void sieve(size_t max) {
  if (max + 1 > IsPrime.size()) {
    IsPrime.resize(max + 1, true);
  }
  IsPrime[0] = false;
  IsPrime[1] = false;
  for (size_t i = 2; i * i <= max; ++i)
    if (IsPrime[i])
      for (size_t j = 2; i * j <= max; ++j) IsPrime[i * j] = false;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < long long(n); i++) cin >> a[i];
  vector<long long> prime;
  sieve(1000);
  for (long long i = 0; i < long long(long long(IsPrime.size())); i++) {
    if (IsPrime[i] == true) prime.emplace_back(i);
  }
  long long ans = 0;
  for (long long i = 0; i < long long(long long(prime.size())); i++) {
    long long cnt = 0;
    for (long long j = 0; j < long long(long long(a.size())); j++) {
      if (a[j] % prime[i] == 0) {
        cnt++;
        a[j] /= prime[i];
      }
    }
    ans = max(ans, cnt);
  }
  if (ans == 1)
    cout << "pairwise coprime";
  else if (ans == n)
    cout << "not coprime";
  else
    cout << "setwise coprime";
  return 0;
}
