#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  vector<bool> checked(1000000, 0);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int count = 0;
  bool pairwise = 1;
  bool not_co = 0;
  for (int i = 2; i <= 1000000; i++) {
    if (checked[i])
      continue;
    else {
      count = 0;
      for (int i = 0; i < (n); ++i) {
        if (a[i] % i == 0) count++;
      }
      if (count >= 2) pairwise = 0;
      if (count == n) {
        not_co = 0;
        break;
      }
      for (int j = 2; i * j <= 1000000; j++) checked[i * j] = 1;
    }
  }
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else if (not_co)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
