#include <bits/stdc++.h>
using namespace std;
map<long long int, long long int> sosu;
void insu(long long int a) {
  long long int copy = a;
  long long int i = 2;
  while (i * i < copy) {
    if (a % i == 0) {
      while (a % i == 0) {
        a /= i;
      }
      sosu[i]++;
    }
    i++;
  }
  if (a > 1) {
    sosu[a]++;
  }
  return;
}
int main() {
  long long int n;
  cin >> n;
  vector<long long int> data(n);
  for (int i = int(0); i < int(n); ++i) {
    cin >> data[i];
  }
  for (int i = int(0); i < int(n); ++i) {
    insu(data[i]);
  }
  long long int Max = 0;
  for (auto x = sosu.begin(); x != sosu.end(); x++) {
    Max = max(Max, x->second);
  }
  if (Max == n) {
    cout << "not coprime" << endl;
  } else if (Max == 1) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
