#include <bits/stdc++.h>
using namespace std;
int flag = 0;
int gcd(int x, int y) {
  int wk;
  if (x < y) {
    wk = x;
    x = y;
    y = wk;
  }
  while (y) {
    wk = x % y;
    x = y;
    y = wk;
  }
  if (x != 1) {
    flag = 1;
  }
  return x;
}
int gcd_a(int n, int* a) {
  if (n == 1) return a[0];
  if (n == 2) return gcd(a[0], a[1]);
  int h = n / 2;
  return gcd(gcd_a(h, &a[0]), gcd_a(n - h, &a[h]));
}
int main(void) {
  int n;
  cin >> n;
  int val;
  int i;
  int A[n];
  for (i = 0; i < n; i++) {
    cin >> val;
    A[i] = val;
  }
  int size_A = sizeof(A) / sizeof(*A);
  int gcd = gcd_a(size_A, A);
  if (gcd == 1) {
    if (flag == 0) {
      cout << "setwise coprime";
    } else {
      cout << "pairwise coprime";
    }
  } else {
    cout << "not coprime";
  }
  return 0;
}
