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