#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int modInverse(long long int n, long long int p) {
  return power(n, p - 2, p);
}
long long int nCr(long long int n, long long int r, long long int p) {
  if (r == 0) return 1;
  long long int fac[n + 1];
  fac[0] = 1;
  for (long long int i = 1; i <= n; i++) fac[i] = fac[i - 1] * i % p;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
int length;
int pri_arr[1000009];
void SieveOfEratosthenes(int n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  pri_arr[0] = 1;
  int i = 1;
  for (int p = 2; p <= n; p++) {
    if (prime[p]) {
      pri_arr[i++] = p;
    }
  }
  length = i;
}
int pri[1000009] = {0};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int i, j, k, n, m, t, p, temp, flag, x, y, z, count, a, b, c, d;
  SieveOfEratosthenes(1000006);
  cin >> n;
  int arr[n];
  for (i = 0; i < n; i++) {
    cin >> arr[i];
    for (j = 0; pri_arr[j] * pri_arr[j] <= arr[i] && j < length; j++) {
      if (arr[i] % pri_arr[j] == 0) {
        pri[pri_arr[j]]++;
        if (pri_arr[j] * pri_arr[j] != arr[i]) pri[arr[i] / pri_arr[j]]++;
      }
    }
  }
  a = 0, b = 0;
  for (i = 2; i < 1000006; i++) {
    if (pri[i] > 1) a = 1;
    if (pri[i] == n) {
      b = 1;
    }
  }
  if (a == 1 && b == 1)
    cout << "not coprime\n";
  else if (a == 0)
    cout << "pairwise coprime\n";
  else if (b == 0)
    cout << "setwise coprime\n";
  return 0;
}
