#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int ddx[8] = {1, 1, 0, -1, -1, -1, 0, 1}, ddy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
long long gcd(long long a, long long b) {
  if (!a) return b;
  return gcd(b % a, a);
}
void test_case() {
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> arr[i];
  }
  long long gd = arr[n - 1];
  long long lc = arr[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    long long v = gcd(lc, arr[i]);
    if (v == 1) {
      cout << "pairwise coprime"
           << "\n";
      return;
    }
    lc = (lc * arr[i]) / gcd(arr[i], lc);
    gd = gcd(gd, arr[i]);
  }
  if (gd == 1) {
    cout << "setwise coprime"
         << "\n";
    return;
  }
  cout << "not coprime"
       << "\n";
  return;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(20);
  int t = 1;
  while (t--) {
    test_case();
  }
}
