#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> primes;
  vector<bool> spf(110000, -1);
  spf[1] = 1;
  for (int i = 2; i < 110000; i++) {
    if (spf[i] == -1) {
      primes.push_back(i);
      for (int j = i * i; j < 110000; j += i) spf[j] = i;
    }
  }
  vector<bool> used(110000, false);
  bool is_pairwise = true;
  for (int b : a) {
    while (b > 1) {
      if (used[spf[b]]) {
        is_pairwise = false;
        break;
      }
      used[spf[b]] = true;
      int B = spf[b];
      b /= B;
    }
    if (!is_pairwise) break;
  }
  int g = a[0];
  for (int i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    if (is_pairwise)
      cout << "pairwise coprime" << endl;
    else
      cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
