#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm_array(vector<long long> a) {
  int n = a.size();
  long long ans = a[0];
  for (int i = 1; i < n; i++) ans = ((ans / (gcd(a[i], ans))) * a[i]);
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int g = 0;
  int n;
  cin >> n;
  vector<long long> a(n);
  long long prod = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    prod = prod * a[i];
    if (i == 0)
      g = a[i];
    else
      g = gcd(g, a[i]);
  }
  long long lcm = lcm_array(a);
  if (lcm == prod)
    cout << "pairwise coprime";
  else if (g == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
