#include <bits/stdc++.h>
int gcd(int a, int b) {
  int i;
  int val;
  i = a;
  while (i > 1) {
    if (a % i == 0 && b % i == 0) {
      val = i;
      return val;
    }
    i--;
  }
  val = 1;
  return val;
}
int main() {
  int n;
  scanf("%d", &n);
  int a[n];
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  int pairCount = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) != 1) {
        pairCount++;
      }
    }
  }
  if (pairCount == 0) {
    printf("pairwise coprime");
    return 0;
  } else {
    int temp = gcd(a[0], a[1]);
    int val;
    for (int i = 2; i < n; i++) {
      val = gcd(temp, a[i]);
    }
    if (val == 1) {
      printf("setwise coprime");
      return 0;
    } else {
      printf("not coprime");
      return 0;
    }
  }
}
