#include <bits/stdc++.h>
using namespace std;
int arr[1000007];
int main() {
  int n, minn = 99999999, flag = 0, pairwise = 1, setwise = 1, i, j;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    minn = min(arr[i], minn);
  }
  for (i = 2; i <= minn; i++) {
    for (j = 0; j < n; j++) {
      if (arr[j] % i == 0) {
        flag++;
      }
    }
    if (flag > 1 && flag < n) {
      pairwise = 0;
    } else if (flag == n) {
      pairwise = 0;
      setwise = 0;
      break;
    }
    flag = 0;
  }
  if (pairwise) {
    printf("pairwise coprime");
  } else if (setwise) {
    printf("setwise coprime");
  } else {
    printf("not coprime");
  }
  return 0;
}
