#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
const int INF = 1000000007;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  vector<int> lcs(n);
  lcs[n - 1] = v[n - 1];
  for (int i = n - 2; i >= 0; i--) lcs[i] = lcm(v[i], lcs[i + 1]);
  bool pc = true;
  for (int i = 0; i < n - 1; i++)
    if (gcd(v[i], lcs[i + 1]) != 1) pc = false;
  if (pc) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long gc = v[0];
  for (int i = 0; i < n; i++) gc = gcd(v[i], gc);
  if (gc == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
