#include <bits/stdc++.h>
using namespace std;
int *a;
int hcf(int a, int b) {
  int k = 2;
  int factor = 1;
  while (k < b) {
    if (a % k == 0 & b % k == 0) {
      factor = k;
      break;
    }
    k++;
  }
  return factor;
}
int main() {
  int n;
  cin >> n;
  int i, j, k;
  a = new int[n];
  for (i = 0; i < n; i++) cin >> a[i];
  int coprime = 0;
  int f;
  int loopcnt = 0;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      if (a[i] != a[j]) {
        loopcnt++;
        f = hcf(a[i], a[j]);
        if (f != 1) {
          break;
        } else
          coprime += 1;
      }
    }
  }
  int cnt;
  int setprime = -1;
  if (coprime != loopcnt) {
    k = 2;
    for (k = 2; k <= a[0]; k++) {
      cnt = 0;
      for (j = 0; j < n; j++) {
        if (a[j] % k == 0) {
          cnt++;
        }
      }
      if (cnt == n) {
        setprime = 1;
      }
    }
  }
  if (setprime == 1)
    cout << "setwise coprime";
  else if (coprime == loopcnt)
    cout << "pairwise coprime";
  else
    cout << "not coprime";
  return 0;
}
