#include <bits/stdc++.h>
using namespace std;
bool pairwise = true;
vector<bool> seen(1e+6, false);
void prime_factorize(int n) {
  if (n <= 1) return;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      if (seen[i]) pairwise = false;
      seen[i] = true;
      prime_factorize(i);
      prime_factorize(n / i);
      return;
    }
  }
  seen[n] = true;
  return;
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  bool setwise = true;
  cin >> A[0];
  int cur = A[0];
  for (int i = 1; i < N; i++) {
    cin >> A[i];
    cur = gcd(cur, A[i]);
  }
  if (cur != 1) setwise = false;
  for (int i = 0; i < (N); i++) {
    prime_factorize(A[i]);
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (setwise) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
