#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, flag1 = 1, flag2 = 1;
int a[N], f[N];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    int l = 2;
    while (a[i] != 1) {
      if (a[i] % l == 0) f[l]++;
      while (a[i] % l == 0) a[i] /= l;
      l++;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (f[i] > 1) {
      flag1 = 0;
      break;
    }
  }
  if (flag1) {
    printf("pairwise coprime\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (f[i] >= n) {
      flag2 = 0;
      break;
    }
  }
  if (flag2) {
    printf("setwise coprime\n");
    return 0;
  }
  printf("not coprime\n");
  return 0;
}
