#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
long long gc[1000006];
long long gcd(long long a, long long b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v.push_back(x);
  }
  long long fu = 0, _ = v[n - 1];
  for (long long i = n - 2; i >= 0; i--) {
    if (gcd(v[i], v[i + 1]) != 1) fu = 1;
    _ = gcd(_, v[i]);
  }
  long long f = 0, ff = 0;
  if (_ == 1) f = 1;
  if (fu == 0) f = 2;
  if (f == 0)
    cout << "not coprime" << endl;
  else if (f == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
  return 0;
}
