#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  long long max_num = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    max_num = max(max_num, a[i]);
  }
  vector<long long> num_sum(max_num, 0);
  for (long long i = 0; i < n; i++) {
    for (long long j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        while (a[i] % j == 0) {
          a[i] /= j;
        }
        num_sum[j]++;
      }
    }
    if (a[i] != 1) {
      num_sum[a[i]]++;
    }
  }
  long long max_ans = 0;
  for (long long i = 0; i < num_sum.size(); i++) {
    max_ans = max(max_ans, num_sum[i]);
  }
  if (max_ans == 1) {
    cout << "pairwise coprime" << endl;
  } else if (max_ans < n) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
