#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int f[1001001] = {};
  for (int i = 0; i < (n); ++i) {
    int a;
    cin >> a;
    f[a]++;
  }
  int ma = 1;
  for (int i = 1; i < 1000001; ++i) {
    int tmp = 0;
    for (int j = 1; j < 1001001; ++j) {
      if (i * j > 1000000) break;
      tmp += f[i * j];
    }
    ma = max(ma, tmp);
  }
  if (ma == n) {
    cout << "not coprime" << endl;
  } else if (ma == 1) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
