#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long prime[10000001];
void smallestPrime() {
  for (long long i = 1; i <= 10000000; i++) prime[i] = i;
  for (long long i = 4; i <= 10000000; i += 2) prime[i] = 2;
  for (long long i = 3; i * i <= 1000000; i++) {
    if (prime[i] == i) {
      for (long long j = i * i; j <= 10000000; j += i) prime[j] = i;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  smallestPrime();
  bool pairWise = false;
  bool setwise = false;
  unordered_set<long long> present;
  for (long long i = 0; i < n; i++) {
    if (present.find(prime[a[i]]) != present.end()) {
      pairWise = true;
      setwise = true;
    }
    present.insert(prime[a[i]]);
  }
  if (!pairWise)
    cout << "pairwise coprime" << '\n';
  else {
    if (present.size() == 1)
      cout << "not coprime" << '\n';
    else
      cout << "setwise coprime" << '\n';
  }
  return 0;
}
