#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> an(n);
  for (int i = 0; i < n; ++i) cin >> an[i];
  vector<int> prime(1000001, 0);
  bool pc = true, sc = true;
  for (int i = 0; i < n; ++i) {
    for (int j = 2; j < 1001; ++j) {
      if (an[i] % j == 0) {
        while (an[i] % j == 0) an[i] /= j;
        ++prime[j];
      }
    }
  }
  for (int i = 0; i < 1000001; ++i) {
    if (prime[i] > 1) pc = false;
    if (prime[i] == n) sc = false;
  }
  if (pc)
    cout << "pairwise coprime" << endl;
  else if (sc)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
