#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void solve() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long n;
  cin >> n;
  long long ar[n];
  for (long long i = 0; i < n; i++) {
    cin >> ar[i];
  }
  long long prd = 1;
  for (long long i = 0; i < n; i++) {
    prd *= ar[i];
  }
  long long lcm = ar[0];
  for (long long i = 1; i < n; i++) {
    long long temp = lcm * ar[i] / gcd(lcm, ar[i]);
    lcm = temp;
  }
  if (prd == lcm) {
    cout << "pairwise coprime" << '\n';
    return;
  }
  long long g = ar[0];
  for (long long i = 1; i < n; i++) {
    g = gcd(g, ar[i]);
  }
  if (g == 1)
    cout << "setwise coprime" << '\n';
  else
    cout << "not coprime" << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long t = 1;
  for (long long i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
