#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int main() {
  int n;
  cin >> n;
  vector<int> d(n);
  for (int i = 0; i < n; i++) cin >> d[i];
  int m = 1e6 + 2;
  vector<int> prime;
  vector<bool> used(m, false);
  for (int i = 2; i < m; i++)
    if (!used[i]) {
      prime.push_back(i);
      for (int j = i * 2; j < m; j += i) used[j] = true;
    }
  bool flag2 = false;
  int res = d[0];
  for (int i = 1; i < n; i++) {
    res = gcd(res, d[i]);
    if (res == 1) {
      flag2 = true;
      break;
    }
  }
  bool flag1 = true;
  set<int> s;
  for (int i = n - 1; i >= 0; i--) {
    for (int j = 0; j < (int)prime.size() && d[i] > 0; j++) {
      while (d[i] > 0 && d[i] % prime[j] == 0) {
        if (s.count(prime[j])) {
          flag1 = false;
        } else
          s.insert(prime[j]);
        while (d[i] > 0 && d[i] % prime[j] == 0) d[i] /= prime[j];
      }
    }
  }
  if (flag1) return cout << "pairwise coprime" << endl, 0;
  if (flag2) return cout << "setwise coprime" << endl, 0;
  cout << "not coprime" << endl;
  return 0;
}
