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