#include <bits/stdc++.h>
using namespace std;
unsigned long long int gcdimpl(unsigned long long int a,
                               unsigned long long int b) {
  if (b == 0) return a;
  return gcdimpl(b, a % b);
}
unsigned long long int gcdfn(unsigned long long int a,
                             unsigned long long int b) {
  if (a < b) swap(a, b);
  return gcdimpl(a, b);
}
int main() {
  int n, i;
  cin >> n;
  vector<unsigned long long int> a(n);
  for (unsigned long long int& x : a) cin >> x;
  unsigned long long int gcd = gcdfn(a[0], a[1]), pdt = a[0] * a[1];
  unsigned long long int lcm = pdt / gcd;
  for (i = 2; i < n; i++) {
    gcd = gcdfn(gcd, a[i]);
    lcm = (a[i] * lcm) / gcdfn(a[i], lcm);
    pdt *= a[i];
  }
  if (gcd != 1)
    cout << "not coprime\n";
  else if (pdt == lcm)
    cout << "pairwise coprime\n";
  else
    cout << "setwise coprime\n";
  return 0;
}
