#include <bits/stdc++.h>
using namespace std;
int main() {
  long long sum = 0;
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  long long ans = 0;
  long long count = 0;
  for (long long i = 0; i < n; i++) {
    if (sum % a[i] == 0) {
      count++;
    }
  }
  if (count == 0) {
    cout << "pairwise coprime" << endl;
  } else if (count == n) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
