#include <bits/stdc++.h>
long int gcd(long int x, long int y) {
  while (x != 0) {
    if (x >= y)
      x = x % y;
    else {
      y = y % x;
      long int temp = x;
      x = y;
      y = temp;
    }
  }
  return y;
}
int main() {
  long int n;
  scanf("%li", &n);
  long int *b = (long int *)malloc(n * sizeof(long int));
  int i, j;
  for (i = 0; i < n; i++) scanf("%li", &b[i]);
  long int pairs = gcd(b[0], b[1]), set = pairs;
  for (i = 0; i < n - 1; i++)
    for (j = i + 1; j < n; j++)
      if (pairs == 1)
        pairs = gcd(b[i], b[j]);
      else if (j == (i + 1))
        set = gcd(set, b[j]);
  if (pairs == 1)
    printf("pairwise compare\n");
  else if (set == 1)
    printf("setwise compare\n");
  else
    printf("not coprime\n");
  return 0;
}
