#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll N;
  cin >> N;
  ll A[1000001];
  ll max_num = 0;
  for (ll i = 1; i <= N; i++) {
    cin >> A[i];
    max_num = max(max_num, A[i]);
  }
  bool pair = true;
  bool set = true;
  for (ll i = 2; i <= sqrt(max_num); i++) {
    ll check_num = 0;
    for (ll j = 1; j <= N; j++) {
      if (A[j] % i == 0) {
        check_num++;
      }
    }
    if (check_num > 1) {
      pair = false;
    }
    if (check_num == N) {
      set = false;
    }
  }
  if (pair) {
    cout << "pairwise coprime" << endl;
  } else if (set) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
