#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  vector<long long> primes = {2, 3, 5, 7, 11, 13};
  for (long long i = 17; i < 1000; i += 2) {
    bool ok = true;
    for (long long j = 0; primes[j] * primes[j] <= i; ++j) {
      if (i % primes[j] == 0) {
        ok = false;
        break;
      }
    }
    if (ok) primes.emplace_back(i);
  }
  map<long long, long long> cnt;
  for (long long i : a) {
    long long t = i;
    for (long long j = 0; primes[j] * primes[j] <= t; ++j) {
      if (t % primes[j] == 0) cnt[primes[j]]++;
      while (t % primes[j] == 0) t /= primes[j];
    }
    if (t != 1) cnt[t]++;
  }
  long long hi = 0;
  for (auto p : cnt) hi = max(hi, p.second);
  if (hi <= 1) {
    printf("pairwise coprime");
    return 0;
  }
  printf(hi < n ? "setwise coprime" : "not coprime");
  return 0;
}
