#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  vector<int> A(N);
  vector<vector<int>> Yakusuu(N);
  for (long n = 0; n < (N); n++) {
    cin >> A[n];
  }
  vector<int> Yakusuu_Count(1000001, 0);
  for (long n = 0; n < (N); n++) {
    for (long i = 1; i * i <= A[n]; i++) {
      if (A[n] % i == 0) {
        Yakusuu_Count[i]++;
        Yakusuu_Count[A[n] / i]++;
      }
    }
  }
  bool pairwise_coprime = true;
  bool setwise_coprime = true;
  for (int i = 2; i < 1000001; i++) {
    int count = Yakusuu_Count[i];
    if (count > 1) {
      pairwise_coprime = false;
    }
    if (count == N) {
      setwise_coprime = false;
    }
  }
  if (pairwise_coprime) {
    cout << "pairwise coprime" << endl;
  } else if (setwise_coprime) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
