#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) return gcd(b, a);
  if (b == 0) return a;
  return gcd(b, a % b);
}
signed main() {
  long long sosuu[1001000] = {0};
  vector<long long> pri;
  for (long long i = 2; i < 1001000; i++) {
    if (sosuu[i] == 0) {
      pri.push_back(i);
      for (long long j = i; j < 1001000; j += i) {
        sosuu[j] = 1;
      }
    }
  }
  long long N;
  long long A[1001000];
  cin >> N;
  for (long long i = 0; i < N; i++) {
    cin >> A[i];
  }
  bool f = true;
  for (long long i = 0; i < N; i++) {
    long long n = A[i];
    for (long long j = 0; j < pri.size(); j++) {
      if (pri[j] == -1) continue;
      if (n % pri[j] == 0) {
        while (n % pri[j] == 0) n /= pri[j];
        pri[j] = -1;
      }
    }
    if (n != 1) {
      f = false;
      break;
    }
  }
  if (f) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long g = A[0];
  for (long long i = 1; i < N; i++) {
    g = gcd(g, A[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
