#include <bits/stdc++.h>
using namespace std;
int n;
int arr[1000005];
bitset<1000005> primo;
bitset<1000005> e;
bool sieve() {
  primo.set();
  primo[0] = primo[1] = 0;
  int cont;
  for (int i = 2; i * i < 1000005; i++) {
    if (primo[i]) {
      cont = 0;
      if (e[i]) cont++;
      for (int j = i * i; j < 1000005; j += i) {
        primo[j] = 0;
        if (e[j]) cont++;
      }
      if (cont > 1) return false;
    }
  }
  return true;
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  e.reset();
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    e[arr[i]] = 1;
  }
  if (sieve())
    cout << "pairwise ";
  else {
    int ac = arr[0];
    for (int i = 1; i < n; i++) {
      ac = gcd(ac, arr[i]);
    }
    if (ac == 1)
      cout << "setwise ";
    else
      cout << "not ";
  }
  cout << "coprime\n";
  return 0;
}
