#include <bits/stdc++.h>
using namespace std;
int convert(int base, int temp) {
  int sum = 0;
  while (temp) {
    sum += (temp % base);
    temp /= base;
  }
  return sum;
}
int GCD(int a, int b) {
  int c = max(a, b);
  int d = min(a, b);
  if (c % d == 0)
    return d;
  else
    return GCD(d, c % d);
}
int main() {
  int i;
  int n;
  while (cin >> n) {
    int ans1 = n - 2;
    int sum = 0;
    for (i = 2; i < n; i++) {
      sum += convert(i, n);
    }
    int gcd = GCD(sum, ans1);
    cout << sum / gcd << '/' << ans1 / gcd << endl;
  }
  return 0;
}
