#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, Ans = 0, tmp = 0;
  cin >> N;
  vector<int> vec(N);
  for (int i = 0; i < (int)(N); i++) {
    cin >> vec.at(i);
  }
  sort(vec.begin(), vec.end());
  for (int i = 2; i <= vec.at(N - 1); i++) {
    tmp = 0;
    for (int j = 0; j < (int)(N); j++) {
      if (vec.at(j) % i == 0) tmp++;
    }
    Ans = max(Ans, tmp);
    if (Ans == N) {
      break;
    }
  }
  if (Ans == N) {
    cout << "not coprime" << endl;
  } else if (Ans >= 2) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
  }
}
