#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
template <typename T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
int main(void) {
  long long n;
  cin >> n;
  vector<long long> a(n);
  long long gcd_all = 10000000;
  long long lcm_all = 1;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
    if (gcd_all != 1) {
      gcd_all = gcd(gcd_all, a[i]);
    }
    lcm_all = lcm(lcm_all, a[i]);
  }
  for (long long i : a) {
    lcm_all /= i;
  }
  if (lcm_all == 1) {
    cout << "pairwise coprime";
  } else if (gcd_all == 1) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
