#include <bits/stdc++.h>
using namespace std;
const long long mxN = (long long)1e6;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long findGCD(long long arr[], long long n) {
  long long result = arr[0];
  for (long long i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
bool prime[mxN + 1];
void SieveOfEratosthenes() {
  memset(prime, true, sizeof(prime));
  for (long long p = 2; p * p <= mxN; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= mxN; i += p) prime[i] = false;
    }
  }
}
void solve() {
  long long n;
  cin >> n;
  long long arr[n];
  unordered_map<long long, long long> maps;
  for (long long i = 0; i < (long long)n; i++) {
    cin >> arr[i];
    maps[arr[i]]++;
  }
  long long gcda = findGCD(arr, n);
  bool cop = 0;
  for (long long i = 0; i < n; i++) {
    if (maps[arr[i] + 1] > 0 || maps[arr[i] - 1] > 0) {
      cop = 1;
      break;
    }
    if (prime[arr[i]]) {
      cop = 1;
      break;
    }
  }
  if (cop)
    cout << "pairwise coprime\n";
  else if (gcda == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long TC = 1;
  while (TC--) solve();
  return 0;
}
