#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b);
int main() {
  int a = 0;
  while (cin >> a) {
    int sum = 0;
    stack<int> s;
    for (int i = 2; i <= a - 1; ++i) {
      int ans = a;
      while (ans) {
        s.push(ans % i);
        ans /= i;
      }
    }
    while (!s.empty()) {
      sum += s.top();
      s.pop();
    }
    int g = gcd(sum, a - 2);
    cout << sum / g << '/' << (a - 2) / g << endl;
  }
  return 0;
}
int gcd(int a, int b) {
  int tmp = a;
  if (a < b) {
    a = b;
    b = tmp;
  }
  while (b) {
    tmp = a % b;
    a = b;
    b = tmp;
  }
  return a;
}
