#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int gcdVal = 0;
  int flag = 0;
  for (int i = 0; i < n; i++) {
    gcdVal = gcd(gcdVal, v[i]);
  }
  for (int i = 0; i < n - 1; i++) {
    if (gcd(v[i], v[i + 1]) != 1) {
      flag = 1;
      break;
    }
  }
  if (flag == 0) {
    cout << "pairwise coprime"
         << "\n";
  } else if (gcdVal == 1)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
}
