#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  long long int g = gcd(a, b);
  return a / g * b;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<long long int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  long long int g = a[n - 1];
  long long int l = a[n - 1];
  bool flag = true;
  for (int i = n - 2; i >= 0; --i) {
    g = gcd(g, a[i]);
    if (gcd(a[i], l) != 1) flag = false;
    l = lcm(a[i], l);
  }
  if (g == 1 && flag)
    cout << "pairwise coprime" << endl;
  else if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
