#include <bits/stdc++.h>
using namespace std;
void output_yn(bool isYes) {
  if (isYes)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
const long long MOD = 1000000007;
int main() {
  int n, state = 0;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  for (long long num = 2; num * num <= a[n - 1]; num++) {
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] % num == 0) {
        cnt++;
      }
    }
    if (cnt == n) {
      state = 2;
      break;
    } else if (cnt >= 2)
      state = 1;
  }
  switch (state) {
    case 0:
      cout << "pairwise coprime" << endl;
      break;
    case 1:
      cout << "setwise coprime" << endl;
      break;
    case 2:
      cout << "not coprime" << endl;
      break;
  }
  return 0;
}
