#include <bits/stdc++.h>
const int MOD = 1e9 + 7;
const long long LLINF = 7e18;
using namespace std;
bool num[1000001];
int coun[1000001];
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  bool is_pairwise = true;
  bool is_setwise = true;
  for (int i = 0; i < n; i++) {
    int tmp = a[i];
    for (int k = 2; k * k <= tmp; k++) {
      if (tmp % k == 0) {
        if (num[k] == true) is_pairwise = false;
        num[k] = true;
        coun[k]++;
        while (tmp % k == 0) {
          tmp /= k;
        }
      }
    }
    if (tmp != 1) {
      if (num[tmp] == true)
        is_pairwise = false;
      else
        is_setwise = true;
      num[tmp] = true;
    }
  }
  for (int i = 1; i <= 1000000; i++) {
    if (coun[i] == n) is_setwise = false;
  }
  if (is_pairwise)
    cout << "pairwise coprime" << endl;
  else if (is_setwise)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
