#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> av(n);
  for (auto& a : av) {
    cin >> a;
  }
  bool pc = true;
  bool sc = true;
  for (int i = 2; i <= 1000; ++i) {
    int temp = 0;
    for (auto& a : av) {
      int c = 0;
      while (a % i == 0) {
        a /= i;
        c = 1;
      }
      temp += c;
    }
    if (1 < temp) {
      pc = false;
      if (temp == n) {
        sc = false;
        break;
      }
    }
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
  } else if (sc) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
