#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T x) {
  std::cout << x << " ";
}
template <typename T>
void println(T x) {
  std::cout << x << "\n";
}
long long gcd(long long a, long long b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
signed main(void) {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (n); i++) cin >> a[i];
  bool pairwise = true;
  set<long long> div;
  for (long long i = 0; i < (n); i++) {
    if (!pairwise) break;
    for (long long j = 1; j * j <= a[i]; ++j) {
      if (a[i] % j == 0) {
        auto it = div.find(j);
        if (it != div.end()) pairwise = false;
        if (j != 1) {
          div.insert(j);
        }
        if (a[i] / j != j && a[i] / j != 1) {
          div.insert(a[i] / j);
        }
      }
    }
  }
  if (pairwise) {
    print("pairwise coprime");
    return 0;
  }
  long long pairgcd = a[0];
  for (long long i = 1; i < (n); i++) {
    pairgcd = gcd(pairgcd, a[i]);
  }
  if (pairgcd == 1) {
    print("setwise coprime");
    return 0;
  } else
    print("not coprime");
}
