#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int x, long long int y) {
  if (y < x) swap(x, y);
  if (x == 0) return y;
  return gcd(y % x, x);
}
std::map<long long int, long long int> decomposePrime(long long int n) {
  std::map<long long int, long long int> m;
  long long int x = 2;
  while (x * x <= n) {
    if (n % x == 0) {
      m[x]++;
      n /= x;
    } else {
      x++;
    }
  }
  if (n > 1) m[n]++;
  return m;
}
void solve() {
  long long int N;
  cin >> N;
  vector<long long int> a(N);
  for (long long int i = static_cast<int>(0); i < static_cast<int>(N); ++i)
    cin >> a[i];
  bool pw = true;
  vector<bool> appeared(N);
  for (auto e : decomposePrime(a[0])) {
    appeared[e.first] = true;
  }
  for (long long int i = 1; i < N; i++) {
    for (auto e : decomposePrime(a[i])) {
      if (appeared[e.first]) pw = false;
      appeared[e.first] = true;
    }
  }
  if (pw) {
    cout << "pairwise coprime" << endl;
    return;
  }
  bool sw = true;
  long long int t = a[0];
  for (long long int i = 1; i < N; i++) {
    t = gcd(t, a[i]);
  }
  if (t != 1) sw = false;
  if (sw) {
    cout << "setwise  coprime" << endl;
    return;
  }
  cout << "not coprime" << endl;
}
int main() {
  solve();
  return 0;
}
