#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a % b == 0)
    return (b);
  else
    return (gcd(b, a % b));
}
int main() {
  int n;
  cin >> n;
  map<int, int> a;
  for (int i = 0; i < (int)(n); i++) {
    int x;
    cin >> x;
    a[x]++;
  }
  bool niko = false;
  for (auto p : a) {
    if (p.second >= 2) {
      niko = true;
      break;
    }
  }
  int kouyaku = 1;
  bool niko2 = false;
  for (auto p : a) {
    kouyaku = p.first;
    break;
  }
  for (auto p : a) {
    kouyaku = gcd(p.first, kouyaku);
    if (kouyaku >= 2) niko2 = true;
  }
  if (kouyaku == 1 && niko == true)
    cout << "setwise coprime" << endl;
  else if (kouyaku == 1 && niko2 == true)
    cout << "setwise coprime" << endl;
  else if (kouyaku == 1 && niko == false)
    cout << "pairwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
