#include <bits/stdc++.h>
using namespace std;
long GCD(long a, long b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
void GeneratePrime(vector<long> &P, long n) {
  P[0] = P[1] = 1;
  for (int i = 2; i < n; i++) {
    if (P[i] != 0) continue;
    for (int j = 2 * i; j < n; j += i)
      if (P[j] == 0) P[j] = i;
    P[i] = i;
  }
}
void Crack() {
  long n;
  cin >> n;
  vector<long> A(n);
  for (int i = 0; i < n; i++) cin >> A[i];
  long gcd = A[0];
  for (int i = 1; i < n; i++) {
    gcd = GCD(gcd, A[i]);
    if (gcd == 1) break;
  }
  long m = 1000001;
  vector<long> P(m, 0);
  GeneratePrime(P, m);
  vector<bool> V(m, false);
  int flag = 0;
  for (int i = 0; i < n; i++) {
    if (A[i] < 2) continue;
    if (V[P[A[i]]]) {
      flag = 1;
      break;
    } else {
      V[P[A[i]]] = true;
      while (A[i] > 1) {
        A[i] /= P[A[i]];
        V[A[i]] = true;
      }
    }
  }
  if (flag == 0)
    cout << "pairwise coprime" << '\n';
  else if (gcd == 1)
    cout << "setwise coprime" << '\n';
  else
    cout << "not coprime" << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  Crack();
  return 0;
}
