#include <bits/stdc++.h>
using namespace std;
int a;
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
void solve() {
  int temp, sum = 0, m, i;
  for (i = 2; i < a; i++) {
    temp = a;
    while (temp) {
      sum += temp % i;
      temp = temp / i;
    }
  }
  m = gcd(sum, a - 2);
  printf("%d/%d\n", sum / m, (a - 2) / m);
}
int main() {
  while (scanf("%d", &a) == 1) {
    solve();
  }
  fclose(stdin);
  fclose(stdout);
  return 0;
}
