#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0LL)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  vector<long long> prod(n);
  prod[n - 1] = 1;
  for (int i = n - 2; i >= 0; --i) {
    prod[i] = prod[i + 1] * a[i + 1];
  }
  bool bad = 0;
  for (int i = 0; i < n; ++i) {
    if ((int)gcd(a[i], prod[i]) != 1) {
      bad = 1;
      break;
    }
  }
  if (!bad) {
    cout << "pairwise coprime" << '\n';
    return 0;
  }
  int tot_g = a[0];
  for (int i = 1; i < n; ++i) tot_g = gcd(tot_g, a[i]);
  if (tot_g == 1) {
    cout << "setwise coprime" << '\n';
    return 0;
  }
  cout << "not coprime" << '\n';
  return 0;
}
