#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) {
    int temp;
    temp = a;
    a = b;
    b = temp;
  }
  while (a % b) {
    int r = a % b;
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
int fun(int a, int n) {
  int sum = 0;
  for (;;) {
    sum = sum + a % n;
    a = a / n;
    if (a == 0) break;
  }
  return sum;
}
int main() {
  int i, j, m, n, a, qum = 0;
  while (scanf("%d", &a) != EOF) {
    for (i = 2; i <= (a - 1); i++) {
      qum += fun(a, i);
    }
    m = gcd(qum, a - 2);
    qum = qum / m;
    a = (a - 2) / m + 2;
    printf("%d/%d\n", qum, a - 2);
    qum = 0;
  }
  return 0;
}
