#include <bits/stdc++.h>
using ll = long long;
using namespace std;
bool pf(int n, vector<int> &v) {
  if (n < 2) return false;
  int p = 2;
  while (n > 1) {
    if (n % p != 0) {
      p++;
      continue;
    }
    v.push_back(p);
    while (n % p == 0) n /= p;
  }
  return true;
}
int main(void) {
  int N;
  cin >> N;
  vector<int> prime;
  for (int i = 0; i < (N); i++) {
    int a;
    cin >> a;
    vector<int> v;
    pf(a, v);
    prime.insert(prime.end(), v.begin(), v.end());
  }
  sort(prime.begin(), prime.end());
  bool pc = true;
  bool sc = true;
  int now = 1;
  int count = 1;
  for (int p : prime) {
    if (p == now)
      count++;
    else {
      count = 1;
      now = p;
    }
    if (count > 1) pc = false;
    if (count == N) {
      sc = false;
      break;
    }
  }
  if (pc)
    cout << "pairwise coprime" << endl;
  else if (sc)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
