#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
int main() {
  int x[1000010], n, b[1000010], a[1000010], i, j;
  cin >> n;
  int res = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    b[i] = a[i];
  }
  vector<int> c(1010, 0);
  for (i = 0; i < n; i++) {
    for (j = 2; j * j <= b[i]; j++) {
      if (a[i] < j) {
        break;
      }
      if (a[i] % j == 0) {
        if (c[j] == 0) {
          c[j] = 1;
          while (a[i] % j == 0) {
            a[i] = a[i] / j;
          }
        } else {
          res = 1;
          break;
        }
      }
      if (res == 1) {
        break;
      }
    }
    if (res == 1) {
      break;
    }
  }
  if (res == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (i = 0; i < n; i++) {
    a[i] = b[i];
  }
  int q = gcd(a[0], a[1]);
  for (i = 2; i < n; i++) {
    q = gcd(q, a[2]);
  }
  if (q == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
